2014-07-13 01:04:16 +02:00
|
|
|
//// [arrayAugment.ts]
|
|
|
|
interface Array<T> {
|
|
|
|
split: (parts: number) => T[][];
|
|
|
|
}
|
|
|
|
|
|
|
|
var x = [''];
|
|
|
|
var y = x.split(4);
|
|
|
|
var y: string[][]; // Expect no error here
|
|
|
|
|
|
|
|
|
|
|
|
//// [arrayAugment.js]
|
2015-03-09 02:23:23 +01:00
|
|
|
var x = [
|
|
|
|
''
|
|
|
|
];
|
2014-07-13 01:04:16 +02:00
|
|
|
var y = x.split(4);
|
2014-08-15 22:18:54 +02:00
|
|
|
var y; // Expect no error here
|