Hi, I want to include all fields in scope. I tried this :
@Scopes({
full: {
include: [{ all: true }]
}
})
But I get this error:
Argument of type '{ full: { include: { all: boolean; }[]; }; }' is not assignable to parameter of type 'IDefineScopeOptions'.
Property 'full' is incompatible with index signature.
Type '{ include: { all: boolean; }[]; }' is not assignable to type 'Function | IScopeFindOptions | undefined'.
Type '{ include: { all: boolean; }[]; }' is not assignable to type 'IScopeFindOptions'.
Types of property 'include' are incompatible.
Type '{ all: boolean; }[]' is not assignable to type '(ModelClassGetter | IScopeIncludeOptions)[] | undefined'.
Type '{ all: boolean; }[]' is not assignable to type '(ModelClassGetter | IScopeIncludeOptions)[]'.
Type '{ all: boolean; }' is not assignable to type 'ModelClassGetter | IScopeIncludeOptions'.
Object literal may only specify known properties, and 'all' does not exist in type 'ModelClassGetter | IScopeIncludeOptions'.
Hey @fareshan, thanks for reporting this issue. all: boolean |聽string is missing in the sequelize-typescript typings. This need to be fixed.. until then you can omit the tsc error with [{all: true} as any]
OK , thanks
Hi @cavalor ,
This was fixed in the last version. And I no more need to add the 'as any'
Most helpful comment
Hey @fareshan, thanks for reporting this issue.
all: boolean |聽stringis missing in the sequelize-typescript typings. This need to be fixed.. until then you can omit the tsc error with[{all: true} as any]