there should be no error when use of missing fields in .create() method
Actual Behavior
It cannot be compiled because corresponding fields are missing in 1.4.4
I suggest to extend current interface with
export interface CollectionFieldSchema {
name: string;
type: FieldType;
optional?: boolean;
facet?: boolean;
index?: boolean;
sort?: boolean;
// missing fields in current version (1.4.4)
infix?: boolean,
locale?: string,
// and add expression below to allow to use missing fields in case if there are new added fields on server side, that currently are not supported in typesense.js
[t: string]: unknown
}
Description
In current version of typesense-js (1.4.4) there are no two optional fields in definition of CollectionFieldSchema
Here is an example of interface in Collection.d.ts
{ "infix": boolean, "locale": string, }
But in documentation (0.23.1) there are examples of usage of these fields:
Steps to reproduce
npm i typesense@1.4.4
Expected Behavior
there should be no error when use of missing fields in .create() method
Actual Behavior
It cannot be compiled because corresponding fields are missing in 1.4.4
I suggest to extend current interface with
Metadata
Typesense Version: 0.23.1 OS: Ubuntu 22.04