0

I am in the process of migrate application ionic from ionic 3 to ionic 5 , I use angular 12, node 16, typescript 4.2.3, and "ionic-orm3": "0.1.3", now I found this error

    [ng] Error: node_modules/ionic-orm3/dist/src/metadata-args/collection/EntityMetadataCollection.d.ts:9:5 - error TS2416: Property 'filter' in type 'EntityMetadataCollection' is not assignable to the same property in base type 'EntityMetadata[]'.
[ng]   Type '(callbackfn: (value: EntityMetadata, index?: number | undefined, array?: EntityMetadata[] | undefined) => any, thisArg?: any) => EntityMetadataCollection' is not assignable to type '{ <S extends EntityMetadata>(predicate: (value: EntityMetadata, index: number, array: EntityMetadata[]) => value is S, thisArg?: any): S[]; (predicate: (value: EntityMetadata, index: number, array: EntityMetadata[]) => unknown, thisArg?: any): EntityMetadata[]; }'.
[ng]     Types of parameters 'callbackfn' and 'predicate' are incompatible.
[ng]       Type '(value: EntityMetadata, index: number, array: EntityMetadata[]) => value is any' is not assignable to type '(value: EntityMetadata, index?: number | undefined, array?: EntityMetadata[] | undefined) => any'.
[ng]         Types of parameters 'index' and 'index' are incompatible.
[ng]           Type 'number | undefined' is not assignable to type 'number'.
[ng]             Type 'undefined' is not assignable to type 'number'.
[ng]
[ng] 9     filter(callbackfn: (value: EntityMetadata, index?: number, array?: Array<EntityMetadata>) => any, thisArg?: any): EntityMetadataCollection;

I did a search on the internet and i found error conflict between version typescript and ionic-orm3, I use 4.2.3 version for typescript but ionic-orm3 use version 2 of typescript.

how to fix this error , I'm blocked

thanks for advanced

0

Browse other questions tagged or ask your own question.