Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
55f271d
FIX: Half of the file function translated
cgonzalez-chattigo Oct 14, 2024
aed1b33
FIX: Correct some types in ISearchData Interface
cgonzalez-chattigo Oct 14, 2024
c657c7e
FIX: Search.ts typing completed
cgonzalez-chattigo Oct 14, 2024
53f7f84
FIX: Improving data typing using an spread operator to handle concat.
cgonzalez-chattigo Oct 14, 2024
cfe87f0
FIX: Update Cid typing with an extra string type
cgonzalez-chattigo Oct 14, 2024
0d7d708
ADD: New type setting on .eslintrc to avoid some tslint issues
cgonzalez-chattigo Oct 14, 2024
42c2c75
Merge branch 'f24' into translate-search-js
cgonzalez-chattigo Oct 14, 2024
cf93e3a
FIX: Enhanced types in Data interface, add some eslinter deactivation
cgonzalez-chattigo Oct 14, 2024
6a1b88a
Remove unnecesary explanation comment
Cedgo1997 Oct 14, 2024
a586fa7
FIX eslint tests errors
Cedgo1997 Oct 14, 2024
98cb1c3
ADD: Optional chain to tag.value
Cedgo1997 Oct 14, 2024
72e1a5f
FIX Tag ambiguous typing
Cedgo1997 Oct 14, 2024
4892bf2
FIX linter errors
Cedgo1997 Oct 14, 2024
336f74f
Fix Single quote issue
Cedgo1997 Oct 14, 2024
e1bf71f
Fix util parenthesis issue
Cedgo1997 Oct 14, 2024
a5a9daa
Delete unused global d ts
Cedgo1997 Oct 14, 2024
2901a0f
Add typing to category property on post interfaces
Cedgo1997 Oct 14, 2024
484af2d
Fix new line lint issue problem on post interface
Cedgo1997 Oct 14, 2024
396f59b
Fix exporting default issues
Cedgo1997 Oct 14, 2024
0c6475d
Fix semicolon and newline on search.ts
Cedgo1997 Oct 14, 2024
5d3d3b8
Fix promisify import on ts file
Cedgo1997 Oct 14, 2024
6a4eea5
Merge pull request #2 from Cedgo1997/f24
Cedgo1997 Oct 14, 2024
c8b74e8
Fix search.search is not a function trying to define it from the begi…
Cedgo1997 Oct 14, 2024
6cc2b18
Fix trailing comma and semicolon
Cedgo1997 Oct 14, 2024
109da63
Change default export with module export
Cedgo1997 Oct 14, 2024
7de5855
Revert export module
Cedgo1997 Oct 14, 2024
d0bba4f
Testing green 2 pendings
Cedgo1997 Oct 14, 2024
951d347
Fix export type in search.ts
Cedgo1997 Oct 14, 2024
98dc8b1
Fix test asynchronous for search js
Cedgo1997 Oct 14, 2024
161ba40
Fix single quotes on tests
Cedgo1997 Oct 14, 2024
f1c329c
Fix tests asynchrony
Cedgo1997 Oct 14, 2024
eda54fd
Merge pull request #1 from Cedgo1997/translate-search-js
Cedgo1997 Oct 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
{
"extends": "nodebb"
"parser": "@typescript-eslint/parser",
"extends": [
"nodebb",
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint"
],
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
}
}
Binary file added dump.rdb
Binary file not shown.
Empty file added src/dummy.js
Empty file.
2 changes: 2 additions & 0 deletions src/interfaces/post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
28 changes: 28 additions & 0 deletions src/interfaces/post.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export interface IPost {
pid: number,
uid: number,
tid: number,
timestamp: number,
deleted: boolean,
upvotes: number,
downvotes: number,
category: Record<string, unknown>,
topic: ITopic,
user: {
username?: string,
},
}

export interface ITopic {
postcount?: string,
deleted?: boolean,
category?: Record<string, unknown>,
tags?: ITag[] | string[],
cid?: number
}

export interface ITag {
value?: string
}


2 changes: 2 additions & 0 deletions src/interfaces/search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
24 changes: 24 additions & 0 deletions src/interfaces/search.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export interface ISearchData {
query: string,
searchIn: string,
uid?: number;
hasTags?: string,
categories?: string[],
searchChildren?: boolean,
sortBy?: string,
sortDirection?: string,
matchWords?: string,
returnIds?: number[],
itemsPerPage?: number,
page?: number,
replies?: string,
timeRange?: string,
repliesFilter?: string,
timeFilter?: string,
postedBy?: string
}

export interface ISearch {
search(data: ISearchData): Promise<{ time: string, [key: string]: unknown }>;
}

Loading