4 ms·
Use Typescript. Regular JS just has too many gotchas to be usable in large applications. You can crank up the settings in TsLint and never worry about things l
by nullwasamistake 7y ago
Use Typescript. Regular JS just has too many gotchas to be usable in large applications.
You can crank up the settings in TsLint and never worry about things like this again
- acdha 7y agoDid you try testing that? The TypeScript compiler does't say a thing about that code: https://www.typescriptlang.org/play/index.html#src=alert(%5B'1'%2C%20'7'%2C%20'11'%5D.map(parseInt))%3B https://www.typescriptlang.org/play/index.html#src=alert(%5B... TSLint similarly reports nothing even with the tslint:all ruleset: https://palantir.github.io/tslint-playground/?saved=N4Igxg9gJgpiBcIDaByAjCgNAAhQdi1zQwF0A6AWwEMAHAChqoCcBnGASQDsAXASgG4AOpxCZwETgDMAlgHMEIAPSLsATQgBXbGCqdsFaNMkBPbNwAWMbRJmyNTKt2kTslplYDu0i9mOam2BAenGTCytgAslQA1lYs9lYWjr7+2ABWLC7SLNgAblQANtJQOLpQ2EYpWkwaetI8EGEqEBYwAdnxMCw43EymYJZg0fWyZpbWnJkFVpIQAW1McyyhnMLAwtib2IIgMAAe3DCcUCw78NhIO9wsRTzwhQU7JJgbWzs106cI2MAAvtjhKhQcpAqDeZycQrYD5dbBlMYwaQBSBSOT2RwQ4S-YQgX5AA https://palantir.github.io/tslint-playground/?saved=N4Igxg9g... https://palantir.github.io/tslint-playground/ https://palantir.github.io/tslint-playground/
- nullwasamistake 7y agoDoesn't seem right, are all the strict compiler options enabled?
- acdha 7y agoYes, can you post the configuration you used for your original claim?
- deleted 7y ago[deleted]