denodb
denodb copied to clipboard
Error importing {Model}, FieldValue is not assignable to type 'FieldValue'
First time using denodb, nice easy to use syntax, really loved it, bad impression because I couldn't get to run any code Just an import of Model throws this error
Code:
import { Model } from "https://deno.land/x/denodb/mod.ts";
Results in
error: TS2322 [ERROR]: Type 'string | number | boolean | Date | (() => FieldValue) | null' is not assignable to type 'FieldValue'.
Type '() => FieldValue' is not assignable to type 'FieldValue'.
Type '() => FieldValue' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more.
defaultValue: fieldDefaults[field],
~~~~~~~~~~~~
at https://deno.land/x/[email protected]/lib/translators/sql-translator.ts:144:19
The expected type comes from property 'defaultValue' which is declared here on type 'FieldOptions'
defaultValue: FieldValue;
~~~~~~~~~~~~
at https://deno.land/x/[email protected]/lib/data-types.ts:77:3
deno 1.5.3 (ab7b8ba, release, x86_64-unknown-linux-gnu) v8 8.7.220.3 typescript 4.0.5
fixed in #157 :)