it should be possible to extend build-in types in ts 1.6 as I read here:
TypeScript 1.6 adds support for classes extending arbitrary expression that comp
Extending Array
is only supported in ES6 environments, so if you've set the compilerSettings.target
of your tsconfig.json
to ES3 or ES5 this won't work properly. There are workarounds in ES5 but I'd say it isn't worth the trouble - although you can probably use it in TypeScript since it is a superset of ES5. This book on ES6 explains the situation in more detail.