TypeScript/tests/cases/conformance/types/thisType/thisTypeInTuples.ts

9 lines
154 B
TypeScript
Raw Normal View History

2015-09-27 18:05:17 +02:00
interface Array<T> {
slice(): this;
}
let t: [number, string] = [42, "hello"];
let a = t.slice();
let b = t.slice(1);
let c = t.slice(0, 1);