TypeScript/tests/baselines/reference/arrayconcat.types

95 lines
4.5 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/arrayconcat.ts ===
interface IOptions {
2015-04-13 23:01:57 +02:00
>IOptions : IOptions, Symbol(IOptions, Decl(arrayconcat.ts, 0, 0))
2014-08-15 23:33:16 +02:00
name?: string;
2015-04-13 23:01:57 +02:00
>name : string, Symbol(name, Decl(arrayconcat.ts, 0, 20))
2014-08-15 23:33:16 +02:00
flag?: boolean;
2015-04-13 23:01:57 +02:00
>flag : boolean, Symbol(flag, Decl(arrayconcat.ts, 1, 18))
2014-08-15 23:33:16 +02:00
short?: string;
2015-04-13 23:01:57 +02:00
>short : string, Symbol(short, Decl(arrayconcat.ts, 2, 19))
2014-08-15 23:33:16 +02:00
usage?: string;
2015-04-13 23:01:57 +02:00
>usage : string, Symbol(usage, Decl(arrayconcat.ts, 3, 19))
2014-08-15 23:33:16 +02:00
set?: (s: string) => void;
2015-04-13 23:01:57 +02:00
>set : (s: string) => void, Symbol(set, Decl(arrayconcat.ts, 4, 19))
>s : string, Symbol(s, Decl(arrayconcat.ts, 5, 11))
2014-08-15 23:33:16 +02:00
type?: string;
2015-04-13 23:01:57 +02:00
>type : string, Symbol(type, Decl(arrayconcat.ts, 5, 30))
2014-08-15 23:33:16 +02:00
experimental?: boolean;
2015-04-13 23:01:57 +02:00
>experimental : boolean, Symbol(experimental, Decl(arrayconcat.ts, 6, 18))
2014-08-15 23:33:16 +02:00
}
class parser {
2015-04-13 23:01:57 +02:00
>parser : parser, Symbol(parser, Decl(arrayconcat.ts, 8, 1))
2014-08-15 23:33:16 +02:00
public options: IOptions[];
2015-04-13 23:01:57 +02:00
>options : IOptions[], Symbol(options, Decl(arrayconcat.ts, 10, 14))
>IOptions : IOptions, Symbol(IOptions, Decl(arrayconcat.ts, 0, 0))
2014-08-15 23:33:16 +02:00
public m() {
2015-04-13 23:01:57 +02:00
>m : () => void, Symbol(m, Decl(arrayconcat.ts, 11, 28))
2014-08-15 23:33:16 +02:00
this.options = this.options.sort(function(a, b) {
2014-08-22 03:39:46 +02:00
>this.options = this.options.sort(function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } }) : IOptions[]
2015-04-13 23:01:57 +02:00
>this.options : IOptions[], Symbol(options, Decl(arrayconcat.ts, 10, 14))
>this : parser, Symbol(parser, Decl(arrayconcat.ts, 8, 1))
>options : IOptions[], Symbol(options, Decl(arrayconcat.ts, 10, 14))
2014-08-22 03:39:46 +02:00
>this.options.sort(function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } }) : IOptions[]
2015-04-13 23:01:57 +02:00
>this.options.sort : (compareFn?: (a: IOptions, b: IOptions) => number) => IOptions[], Symbol(Array.sort, Decl(lib.d.ts, 1054, 45))
>this.options : IOptions[], Symbol(options, Decl(arrayconcat.ts, 10, 14))
>this : parser, Symbol(parser, Decl(arrayconcat.ts, 8, 1))
>options : IOptions[], Symbol(options, Decl(arrayconcat.ts, 10, 14))
>sort : (compareFn?: (a: IOptions, b: IOptions) => number) => IOptions[], Symbol(Array.sort, Decl(lib.d.ts, 1054, 45))
2014-08-22 03:39:46 +02:00
>function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } } : (a: IOptions, b: IOptions) => number
2015-04-13 23:01:57 +02:00
>a : IOptions, Symbol(a, Decl(arrayconcat.ts, 14, 44))
>b : IOptions, Symbol(b, Decl(arrayconcat.ts, 14, 46))
2014-08-15 23:33:16 +02:00
var aName = a.name.toLowerCase();
2015-04-13 23:01:57 +02:00
>aName : string, Symbol(aName, Decl(arrayconcat.ts, 15, 15))
2014-08-15 23:33:16 +02:00
>a.name.toLowerCase() : string
2015-04-13 23:01:57 +02:00
>a.name.toLowerCase : () => string, Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51))
>a.name : string, Symbol(IOptions.name, Decl(arrayconcat.ts, 0, 20))
>a : IOptions, Symbol(a, Decl(arrayconcat.ts, 14, 44))
>name : string, Symbol(IOptions.name, Decl(arrayconcat.ts, 0, 20))
>toLowerCase : () => string, Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51))
2014-08-15 23:33:16 +02:00
var bName = b.name.toLowerCase();
2015-04-13 23:01:57 +02:00
>bName : string, Symbol(bName, Decl(arrayconcat.ts, 16, 15))
2014-08-15 23:33:16 +02:00
>b.name.toLowerCase() : string
2015-04-13 23:01:57 +02:00
>b.name.toLowerCase : () => string, Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51))
>b.name : string, Symbol(IOptions.name, Decl(arrayconcat.ts, 0, 20))
>b : IOptions, Symbol(b, Decl(arrayconcat.ts, 14, 46))
>name : string, Symbol(IOptions.name, Decl(arrayconcat.ts, 0, 20))
>toLowerCase : () => string, Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51))
2014-08-15 23:33:16 +02:00
if (aName > bName) {
>aName > bName : boolean
2015-04-13 23:01:57 +02:00
>aName : string, Symbol(aName, Decl(arrayconcat.ts, 15, 15))
>bName : string, Symbol(bName, Decl(arrayconcat.ts, 16, 15))
2014-08-15 23:33:16 +02:00
return 1;
2015-04-13 21:36:11 +02:00
>1 : number
2014-08-15 23:33:16 +02:00
} else if (aName < bName) {
>aName < bName : boolean
2015-04-13 23:01:57 +02:00
>aName : string, Symbol(aName, Decl(arrayconcat.ts, 15, 15))
>bName : string, Symbol(bName, Decl(arrayconcat.ts, 16, 15))
2014-08-15 23:33:16 +02:00
return -1;
>-1 : number
2015-04-13 21:36:11 +02:00
>1 : number
2014-08-15 23:33:16 +02:00
} else {
return 0;
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00
}
});
}
}