Trying to use with TS, but get this error
Wiklem opened this issue · comments
error TS2345: Argument of type '{ name: string; description: string; class: string; schema: any; }' is not assignable to parameter of type 'ConfigurationObject'.
Types of property 'class' are incompatible.
Type 'string' is not assignable to type 'ClassFieldType'.
Same here. I've fix that by change in index.d.ts (JUST QUICK FIX)
type ConfigurationObject = {
name: string,
description?: string,
class: ClassFieldType,
schema: mongoose.Schema,
exclude?: RegExp | string[],
extend?: ExtendFieldType,
fields?: ObjectKeyStringValueAnyType,
};
type ConfigurationObject = {
name: string,
description?: string,
class: string,
schema: mongoose.Schema,
exclude?: RegExp | string[],
extend?: ExtendFieldType,
fields?: ObjectKeyStringValueAnyType,
};
should be fixed in v2.8.1
You don't resolve this problem