-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CollectionCreateSchema
fields
property is now optional in types
#149
Comments
Oh never mind found out why, should've researched a bit more. But then I guess the question becomes: Is there any point of providing anything else than the name of the new collection in this case? Or do the properties outside of In that case maybe making async create<TOptions extends CollectionCreateOptions>(
schema: TOptions["src_name"] extends string
? Pick<CollectionCreateSchema, "name">
: CollectionCreateSchema,
options?: TOptions,
): Promise<CollectionSchema> {
return this.apiCall.post<CollectionSchema>(RESOURCEPATH, schema, options);
} |
That's correct. When I like the change you've proposed. Do you mind submitting it as a PR? |
Why did
fields
become optional? Can you create a collection without it in some specific way?typesense-js/src/Typesense/Collections.ts
Lines 4 to 11 in c0d2abf
The text was updated successfully, but these errors were encountered: