34 lines
1.1 KiB
Text
34 lines
1.1 KiB
Text
=== tests/cases/compiler/indexer.ts ===
|
|
interface JQueryElement {
|
|
>JQueryElement : JQueryElement, Symbol(JQueryElement, Decl(indexer.ts, 0, 0))
|
|
|
|
id:string;
|
|
>id : string, Symbol(id, Decl(indexer.ts, 0, 25))
|
|
}
|
|
|
|
interface JQuery {
|
|
>JQuery : JQuery, Symbol(JQuery, Decl(indexer.ts, 2, 1))
|
|
|
|
[n:number]:JQueryElement;
|
|
>n : number, Symbol(n, Decl(indexer.ts, 5, 5))
|
|
>JQueryElement : JQueryElement, Symbol(JQueryElement, Decl(indexer.ts, 0, 0))
|
|
}
|
|
|
|
var jq:JQuery={ 0: { id : "a" }, 1: { id : "b" } };
|
|
>jq : JQuery, Symbol(jq, Decl(indexer.ts, 8, 3))
|
|
>JQuery : JQuery, Symbol(JQuery, Decl(indexer.ts, 2, 1))
|
|
>{ 0: { id : "a" }, 1: { id : "b" } } : { [x: number]: { id: string; }; 0: { id: string; }; 1: { id: string; }; }
|
|
>{ id : "a" } : { id: string; }
|
|
>id : string, Symbol(id, Decl(indexer.ts, 8, 20))
|
|
>"a" : string
|
|
>{ id : "b" } : { id: string; }
|
|
>id : string, Symbol(id, Decl(indexer.ts, 8, 37))
|
|
>"b" : string
|
|
|
|
jq[0].id;
|
|
>jq[0].id : string, Symbol(JQueryElement.id, Decl(indexer.ts, 0, 25))
|
|
>jq[0] : JQueryElement
|
|
>jq : JQuery, Symbol(jq, Decl(indexer.ts, 8, 3))
|
|
>0 : number
|
|
>id : string, Symbol(JQueryElement.id, Decl(indexer.ts, 0, 25))
|
|
|