ionic-native-mocks icon indicating copy to clipboard operation
ionic-native-mocks copied to clipboard

Type Error on ContactsMock

Open asofyan opened this issue 6 years ago • 1 comments

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

asofyan avatar Jul 12 '18 02:07 asofyan

Thanks. I will take a look.

chrisgriffith avatar Jul 12 '18 16:07 chrisgriffith