diff --git a/test/types.ts b/test/types.ts new file mode 100644 index 0000000..101eea8 --- /dev/null +++ b/test/types.ts @@ -0,0 +1,16 @@ +import { Document } from 'flexsearch' +import '../index' + +const document = new Document<{ + title: string + description: string + tags: string[] +}>({}) + +async function test() { + const doc = await document.searchAsync('test', { + enrich: true, + pluck: 'test', + }) +} + diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..678ff85 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "target": "ESNext" + } +}