Closed bwgjoseph closed 3 years ago
Issue created https://github.com/couchbaselabs/node-ottoman/issues/470
In the next release alpha.29 we will update the result types of removeById
to look like:
removeById(id: string): Promise<{ cas: any }>;
This method always will return an object with a cas property {cas: any}, we don't add generics due to the return always will this one and there isn't the way to change it.
Fixed w/ alpha 29
Understand that @gsi-alejandro, thanks!
Hi,
Seem like the https://github.com/couchbaselabs/node-ottoman/pull/449 did not update
removeById
typeThe current one is
removeById(id: string): Promise<any>;
Should it be
removeById<Result = R>(id: string): Promise<Result>;
? Not sure if it would workI suppose if changing the declaration to something like this would be much better
By default,
R
takesT
which will beany
if the type is not defined which is essentially the same asSo this would work
removeById<Result = R>(id: string): Promise<Result>;