2014-07-13 01:04:16 +02:00
|
|
|
//// [genericArray1.ts]
|
|
|
|
/*
|
|
|
|
var n: number[];
|
|
|
|
|
|
|
|
interface Array<T> {
|
|
|
|
map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
|
|
|
|
}
|
|
|
|
|
|
|
|
interface String{
|
|
|
|
length: number;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
var lengths = ["a", "b", "c"].map(x => x.length);
|
|
|
|
|
|
|
|
|
|
|
|
//// [genericArray1.js]
|
2014-08-14 23:43:28 +02:00
|
|
|
/*
|
|
|
|
var n: number[];
|
|
|
|
|
|
|
|
interface Array<T> {
|
|
|
|
map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
|
|
|
|
}
|
|
|
|
|
|
|
|
interface String{
|
2014-08-30 05:49:47 +02:00
|
|
|
length: number;
|
2014-08-14 23:43:28 +02:00
|
|
|
}
|
2014-08-12 00:54:12 +02:00
|
|
|
*/
|
2014-07-13 01:04:16 +02:00
|
|
|
var lengths = ["a", "b", "c"].map(function (x) { return x.length; });
|
|
|
|
|
|
|
|
|
|
|
|
//// [genericArray1.d.ts]
|
2014-07-12 01:36:06 +02:00
|
|
|
declare var lengths: number[];
|