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
Before V1.6 I wasn't able to drive from the built-in classes and got a compiler error at design time.
The compiler simply didn't let me do it.
[compile-time error]
Now I'm able to drive from the built-in classes and I'm very happy about that. But unfortunately that also has the effect that I don't get any warning when I'm going to derive from unsupported classes.
Here is an example where I drive from the "HTMLElement" class.
The compiler let me do that, but afterwards I get a runtime error.
[runtime error]
The powerful error handling system of the TypeScript compiler is one of the features I like most. Before, I was able to make any stupid mistake in JavaScript and could only hope that such errors would reveal themselves at runtime. Hopefully before my code went into production. With the 1.6 release you relaxed the error handling system of the compiler. An error which was a compile-time error before became a runtime error with this release.
My question is, did you do that by purpose or was it an unpredicted side effect?
Before you ask, I'm aware that the "HTMLElement" class is not a built-in class but a WebAPI class. But before 1.6 I didn't have to worry about that in any way. WebAPI or built-in, the classes were all handled the same way.
I would appreciate if you could clarify that for me.
Kind regards, Lord Saumagen.
The text was updated successfully, but these errors were encountered:
You should be able to subclass HTMLElement, according to the information available on custom elements. If you cannot, it's potentially an issue in the browser you're targeting which you'll need to work around, such as here (which describes your issue precisely).
"Extending expressions" feature in TypeScript 1.6 leads to inconsistent compiler behaviour.
Dear ladies and gentlemen,
I have a question regarding the compiler behaviour change for the new TypeScript 1.6 feature:
"Expression extending".
[Description at: https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript]

Before V1.6 I wasn't able to drive from the built-in classes and got a compiler error at design time.
The compiler simply didn't let me do it.
[compile-time error]

Now I'm able to drive from the built-in classes and I'm very happy about that. But unfortunately that also has the effect that I don't get any warning when I'm going to derive from unsupported classes.
Here is an example where I drive from the "HTMLElement" class.
The compiler let me do that, but afterwards I get a runtime error.
[runtime error]

The powerful error handling system of the TypeScript compiler is one of the features I like most. Before, I was able to make any stupid mistake in JavaScript and could only hope that such errors would reveal themselves at runtime. Hopefully before my code went into production. With the 1.6 release you relaxed the error handling system of the compiler. An error which was a compile-time error before became a runtime error with this release.
My question is, did you do that by purpose or was it an unpredicted side effect?
Before you ask, I'm aware that the "HTMLElement" class is not a built-in class but a WebAPI class. But before 1.6 I didn't have to worry about that in any way. WebAPI or built-in, the classes were all handled the same way.
I would appreciate if you could clarify that for me.
Kind regards, Lord Saumagen.
The text was updated successfully, but these errors were encountered: