You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classFooErrorextendsError{constructor(message:string){super(message);}}console.log((newFooError('foo')).message);// <nothing>console.log((newError('bar')).message);// bar
Am I missing something obvious or is there a bug with 1.8.9?
it can. the compiler does not complain at you any more. the problem is not the TS compiler.
the problem here is that these classes are native, your runtime does not support extending them at the moment. In the future i would expect all these native types to be conformant with ES6 spec. Homa Wong (@unional) has a comment on how to get it to work with the engines today: #1168 (comment).
Am I missing something obvious or is there a bug with 1.8.9?