Skip to content

Custom error object is no longer typeof Error from TypeScript 2.1 #2178

Closed

Description

@kwonoj

RxJS version:

Code to reproduce:

Expected behavior:

Actual behavior:

Additional information:
Was shared in meeting, it is actually intended design of TS 2.1 (https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work) that no longer allows to extend built in object by default.

Means, all of custom errors in RxJS v5 (i.e TimeoutError) is not typeof Error, will break existing code if anyone does type checking for those, as well as existing test cases too.

Activity

  1. self-assigned this
    on Dec 8, 2016
  2. kwonoj commented on Dec 8, 2016

    @kwonoj
    MemberAuthor

    Assigning myself for now.

  3. added 3 commits that reference this issue on Dec 8, 2016
    4566fca
    12c03ed
    dcdc86c
  4. tetsuharuohzeki commented on Mar 3, 2017

    @tetsuharuohzeki

    @kwonoj

    Seems 2.2 have enhancement support for this

    IE9 & IE10 does not have __proto__. I feel it would not work well for them.

  5. kwonoj commented on Apr 16, 2017

    @kwonoj
    MemberAuthor

    I'm closing this issue since we don't have exact plans to bump up compiler, can revisit later once things are getting clear.

  6. lock commented on Jun 6, 2018

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  7. locked as resolved and limited conversation to collaborators on Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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