When compiling the following typescript:
class Node {
}
It works in the playground but not using VS2013 or grunt-typescript which generates the error
TS2000: Duplicate identifier 'Node'
I guess it can only be because its a reserved word but I have searched the typescript spec for reserved words and can't find any. Is there a list available and why is such a common class name reserved?
Node is already an object in JavaScript. It's not a reserved word, but it is a built-in thing that you don't want to accidently overwrite at runtime (you would break other libraries).
> Node.prototype
Node {insertBefore: function, replaceChild: function, removeChild: function, appendChild: function, hasChildNodes: function…}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With