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
error: TS2345 [ERROR]: Argument of type 'Object' is not assignable to parameter of type 'Schema'.
'Schema' could be instantiated with an arbitrary type which could be unrelated to 'Object'.
The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
return this._connector.write(updatedData);
~~~~~~~~~~~
at https://deno.land/x/[email protected]/mod.ts:32:34
TS2769 [ERROR]: No overload matches this call.
Overload 1 of 2, '(callbackfn: (value: Op, index: number, array: Op[]) => value is Op, thisArg?: any): Op[]', gave the following error.
Argument of type 'Function' is not assignable to parameter of type '(value: Op, index: number, array: Op[]) => value is Op'.
Type 'Function' provides no match for the signature '(value: Op, index: number, array: Op[]): value is Op'.
Overload 2 of 2, '(callbackfn: (value: Op, index: number, array: Op[]) => unknown, thisArg?: any): Op[]', gave the following error.
Argument of type 'Function' is not assignable to parameter of type '(value: Op, index: number, array: Op[]) => unknown'.
Type 'Function' provides no match for the signature '(value: Op, index: number, array: Op[]): unknown'.
const filtered = this.data.filter(predicateFunction);
~~~~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/operator/collection.ts:52:39
TS2345 [ERROR]: Argument of type 'U[]' is not assignable to parameter of type '(string | string[])[]'.
Type 'U' is not assignable to type 'string | string[]'.
Type 'keyof Op' is not assignable to type 'string | string[]'.
Type 'string | number | symbol' is not assignable to type 'string | string[]'.
Type 'number' is not assignable to type 'string | string[]'.
Type 'keyof Op' is not assignable to type 'string[]'.
Type 'U' is not assignable to type 'string[]'.
Type 'keyof Op' is not assignable to type 'string[]'.
Type 'string | number | symbol' is not assignable to type 'string[]'.
Type 'string' is not assignable to type 'string[]'.
const picked = pick(this.data, ...paths) as { [P in U]: Op[P] };
~~~~~~~~
at https://deno.land/x/[email protected]/operator/primitive.ts:24:36
Found 3 errors.
Porting the code to TypeScript doesn't throw any errors and works fine, creating the db.json file with an empty object as expected.
I suspected it might be because of the missing type argument, but removing it from the TypeScript example didn't throw any errors, it worked just the same.
The text was updated successfully, but these errors were encountered:
Hi, I wanted to use casualdb in Deno with JavaScript instead of TypeScript, but it was giving me compiler errors.
Here's my JavaScript code:
And here are the errors I'm getting:
Porting the code to TypeScript doesn't throw any errors and works fine, creating the db.json file with an empty object as expected.
I suspected it might be because of the missing type argument, but removing it from the TypeScript example didn't throw any errors, it worked just the same.
The text was updated successfully, but these errors were encountered: