Skip to content

Unable to throw Custom TypeGuardError. Type validation fails #74

Closed
@rashid301

Description

@rashid301

It seems the typescript declaration of TypeGuardError is missing the actual constructor.

When I do throw new TypeGuardError(errorObject, inputObject), typescript pickups the constructor of Error object and allows only one message argument. But the definition requires errorObject and inputObject

Definition https://github.com/woutervh-/typescript-is/blob/master/index.js#L34
Declaration https://github.com/woutervh-/typescript-is/blob/master/index.d.ts#L167

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions