-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: output types next to source (for now)
- Loading branch information
1 parent
5770b7f
commit cef8144
Showing
11 changed files
with
109 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function _exports(ops: any): Promise<any>; | ||
export = _exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import fii = require("./main.js"); | ||
import browser = require("./browser.js"); | ||
import node = require("./node.js"); | ||
export { fii, browser, node }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const fii = require('./main.js') | ||
const browser = require('./browser.js') | ||
const node = require('./node.js') | ||
|
||
module.exports = { fii, browser, node } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
export = main; | ||
/** | ||
* Creates and intializes index | ||
* @param {FiiOptions} [ops] Options | ||
* @returns Promise<Object> | ||
*/ | ||
declare function main(ops?: FiiOptions): Promise<any>; | ||
declare namespace main { | ||
export { FiiOptions }; | ||
} | ||
/** | ||
* Fii options | ||
*/ | ||
type FiiOptions = { | ||
/** | ||
* Name of `abstract-level` compatible database | ||
*/ | ||
name?: string; | ||
/** | ||
* Creates 'comment' spaces in tokens. | ||
* For example using `#` allows tokens like `boom#1.00` to be retrieved by using `boom`. | ||
* If `tokenAppend` wasnt used, then `{gte: 'boom', lte: 'boom'}` would also return stuff like `boomness#1.00` etc | ||
*/ | ||
tokenAppend?: string; | ||
/** | ||
* Sets case sensitivity of the index | ||
*/ | ||
caseSensitive?: boolean; | ||
/** | ||
* Array of stop words to be stripped using [`stopword`](https://github.com/fergiemcdowall/stopword) | ||
*/ | ||
stopwords?: string[]; | ||
/** | ||
* Array of fields not to index | ||
*/ | ||
doNotIndexField?: string[]; | ||
storeVectors?: boolean; | ||
/** | ||
* Field used to verify that doc exists | ||
*/ | ||
docExistsSpace?: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function _exports(ops: any): Promise<any>; | ||
export = _exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function _exports(token: any, availableFields: any): Promise<any>; | ||
export = _exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
declare function _exports(ops: any): { | ||
AGGREGATE: ({ BUCKETS, FACETS, QUERY }: { | ||
BUCKETS: any; | ||
FACETS: any; | ||
QUERY: any; | ||
}) => Promise<{ | ||
BUCKETS: any; | ||
FACETS: any; | ||
RESULT: any; | ||
}>; | ||
AGGREGATION_FILTER: (aggregation: any, filterSet: any) => any; | ||
BUCKET: (token: any) => Promise<any>; | ||
BUCKETS: (...buckets: any[]) => Promise<any[]>; | ||
CREATED: () => any; | ||
DISTINCT: (...tokens: any[]) => Promise<any[]>; | ||
EXIST: (...ids: any[]) => Promise<any>; | ||
EXPORT: (rangeOps: any) => Promise<any>; | ||
FACETS: (...tokens: any[]) => Promise<any[]>; | ||
FIELDS: () => Promise<any>; | ||
GET: (token: any, pipeline?: (token: any) => Promise<any>) => Promise<any>; | ||
INTERSECTION: (tokens: any, pipeline: any) => Promise<{ | ||
_id: any; | ||
_match: any; | ||
}[]>; | ||
LAST_UPDATED: () => any; | ||
MAX: (fieldName: any) => Promise<any>; | ||
MIN: (token: any, reverse: any) => Promise<any>; | ||
OBJECT: (_ids: any) => Promise<any>; | ||
SET_SUBTRACTION: (a: any, b: any) => Promise<any>; | ||
SORT: (results: any) => Promise<any>; | ||
UNION: (tokens: any, pipeline: any) => Promise<{ | ||
sumTokensMinusStopwords: number; | ||
union: { | ||
_id: any; | ||
_match: any; | ||
}[]; | ||
}>; | ||
parseToken: (token: any) => Promise<any>; | ||
}; | ||
export = _exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
declare function _exports(ops: any): { | ||
DELETE: (_ids: any) => Promise<any>; | ||
IMPORT: (index: any) => any; | ||
PUT: (docs: any, putOptions?: {}) => Promise<any>; | ||
TIMESTAMP_CREATED: () => any; | ||
TIMESTAMP_LAST_UPDATED: (passThrough: any) => any; | ||
}; | ||
export = _exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"include": ["src/**/*"], | ||
"include": ["src/**/*.js"], | ||
"exclude": ["node_modules"], | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"outFile": "dist/fergies-inverted-index.d.ts" | ||
"emitDeclarationOnly": true | ||
} | ||
} |