ionic-native-mocks
ionic-native-mocks copied to clipboard
Type Error on ContactsMock
Typescript Error Class 'ContactsMock' incorrectly extends base class 'Contacts'. Types of property 'find' are incompatible. Type '(fields: ContactFieldType[], options?: IContactFindOptions) => Promise<any[]>' is not assignable to type '(fields: ContactFieldType[], options?: IContactFindOptions) => Promise<Contact[]>'. Types of parameters 'fields' and 'fields' are incompatible. Type 'ContactFieldType[]' is not assignable to type 'ContactFieldType[]'. Two different types with this name exist, but they are unrelated. Type 'ContactFieldType' is not assignable to type 'ContactFieldType'. Two different types with this name exist, but they are unrelated. Type '"name.familyName"' is not assignable to type 'ContactFieldType'.
I am using latest @ionic-native/contacts module. Here is my environment:
- Ionic Framework: 3.9.2
- Ionic App Scripts: 3.1.8
- Angular Core: 5.2.9
- Angular Compiler CLI: 5.2.9
- Node: 9.8.0
Thanks. I will take a look.