1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-26 15:25:21 +02:00

- 添加tsconfig.json

支持ts类型测试

- 添加types.ts
  测试ts静态类型
This commit is contained in:
33431
2025-05-05 03:00:33 +08:00
parent 9e74d1b50e
commit 7498972bca
2 changed files with 21 additions and 0 deletions

16
test/types.ts Normal file
View File

@@ -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',
})
}

5
tsconfig.json Normal file
View File

@@ -0,0 +1,5 @@
{
"compilerOptions": {
"target": "ESNext"
}
}