Skip to content

Expected union of types in Contacts.ts - listContacts() #16

Description

@ropinheiro

In Contacts.ts, in the body of the listContacts() function, line 51 has:

(inError: Error, inDocs: IContact[]) => { ...

This gives me an error, because this.db.find seems to expect the inError to be a union of Error and null.

For the error to disappear, I had to change my code to this:

(inError: Error | null, inDocs: IContact[]) => { ...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions