Skip to content

Support for the new native Error.cause prop #90

Description

@fabis94

Especially when using verror with @types/verror you'll quickly run into the issue of VError.prototype.cause (a function) conflicting with the new Error.prototype.cause (Error obj) API, that is already at stage 4 and thus not going anywhere - https://github.com/tc39/proposal-error-cause

Are there any plans to make this library (and afterwards - its TS types) compatible with this new API? VError should ditch the cause function from the VError prototype, so that it doesn't conflict with the Error.prototype.cause type, and move this function to another name. This new function should also understand how to read both VError style 'cause' values and native Error style 'cause' values.

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