3 ms·
There are a few language corners that don't translate, such as: var x = "".constructor(5); // The property 'constructor' does not exist on value of typ
by johnsoft 13y ago
There are a few language corners that don't translate, such as:
var x = "".constructor(5);
// The property 'constructor' does not exist on value of type 'String'.
The exceptions make sense if you dig into how the type system works. AFAIK these can always be worked around with an explicit cast to any:
var x = (<any>"").constructor(5);
I've found TypeScript to be a huge win for maintainability, and can't imagine going back to raw JS for an app of any complexity. I'd love to have a chance to pair it with Node for something.