1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-01 01:51:57 +02:00

- 更新index.d.ts

- 重构FieldName为泛型,支持自动推断字段定义

- 更新types.ts
  测试ts静态类型
This commit is contained in:
flycran
2025-05-05 10:39:38 +08:00
parent 94d46eb2a9
commit 21ebe443dc
2 changed files with 49 additions and 34 deletions

View File

@@ -4,8 +4,15 @@ import "../index";
const document = new Document<{
title: string
description: string
tags: string[]
}>({});
tags: {
name: string
id: number
}[]
}>({
document: {
index: ["tags"],
},
});
async function test() {
// The correct type