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:
@@ -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
|
||||
|
Reference in New Issue
Block a user