mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
325 B
TypeScript
18 lines
325 B
TypeScript
//// [tests/cases/compiler/arrayAugment.ts] ////
|
|
|
|
//// [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]
|
|
"use strict";
|
|
var x = [''];
|
|
var y = x.split(4);
|
|
var y; // Expect no error here
|