You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// snippet from my projectconst{body: {
collectionName,
updateFields
}}=reqtypesenseClient.collections(collectionName).update({fields: updateFields})// the `update` response seems typed incorrectly relative to what's actually returned.then(update=>{res.status(200).json({data: {collection: update,message: `Collection ${collectionName} updated`}})}).catch(err=>{returnserverError(res,400,`Thee was an error updating the fields for ${collectionName}`,err)})
this is a screenshot of how typescript/vscode interprets the returned value of update
response object from the endpoint which appears to be of type CollectionFieldSchema or perhaps CollectionFieldUpdateSchema
Description
The return value of
client().collection('name').update()
seems to be mis-typed.Steps to reproduce
data sent as JSON from postman to the proxy endpoint I'm working on
this is a screenshot of how typescript/vscode interprets the returned value of
update
response object from the endpoint which appears to be of type
CollectionFieldSchema
or perhapsCollectionFieldUpdateSchema
Expected Behavior
The return type of
update
should match what's actually returnedActual Behavior
It doesn't 🙂
Metadata
Typesense Version:
typesense-js 1.5.2
typesense server 0.23.1 (running in docker)
The text was updated successfully, but these errors were encountered: