2 ms·
This produces a similar error ("Type 5 is not assignable to type 'string'") when compiled with TS: var s: string = "Dog"; s = 5; The difference is that
by int_19h 8y ago
This produces a similar error ("Type 5 is not assignable to type 'string'") when compiled with TS:
var s: string = "Dog";
s = 5;
The difference is that it's a compile-time error, while in PowerShell it's a run-time check. But what's the difference in this case? Either way, it tells you.
- stephengillie 8y agoThe biggest difference - not needing to compile - is offset by the slowness of Powershell. If only one language was best across all metrics.