Skip to content

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

@ropinheiro

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[]) => { ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions