1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
=== tests/cases/compiler/dottedSymbolResolution1.ts ===
interface JQuery {
find(selector: string): JQuery;
>find : (selector: string) => JQuery
>selector : string
}
interface JQueryStatic {
(selector: string): JQuery;
>selector : string
(object: JQuery): JQuery;
>object : JQuery
}
class Base { foo() { } }
>Base : Base
>foo : () => void
function each(collection: string, callback: (indexInArray: any, valueOfElement: any) => any): any;
>each : { (collection: string, callback: (indexInArray: any, valueOfElement: any) => any): any; (collection: JQuery, callback: (indexInArray: number, valueOfElement: Base) => any): any; }
>collection : string
>callback : (indexInArray: any, valueOfElement: any) => any
>indexInArray : any
>valueOfElement : any
function each(collection: JQuery, callback: (indexInArray: number, valueOfElement: Base) => any): any;
>each : { (collection: string, callback: (indexInArray: any, valueOfElement: any) => any): any; (collection: JQuery, callback: (indexInArray: number, valueOfElement: Base) => any): any; }
>collection : JQuery
>callback : (indexInArray: number, valueOfElement: Base) => any
>indexInArray : number
>valueOfElement : Base
function each(collection: any, callback: (indexInArray: any, valueOfElement: any) => any): any {
>each : { (collection: string, callback: (indexInArray: any, valueOfElement: any) => any): any; (collection: JQuery, callback: (indexInArray: number, valueOfElement: Base) => any): any; }
>collection : any
>callback : (indexInArray: any, valueOfElement: any) => any
>indexInArray : any
>valueOfElement : any
return null;
>null : null
}
function _setBarAndText(): void {
>_setBarAndText : () => void
var x: JQuery, $: JQueryStatic
>x : JQuery
>$ : JQueryStatic
each(x.find(" "), function () {
>each(x.find(" "), function () { var $this: JQuery = $(''), thisBar = $this.find(".fx-usagebars-calloutbar-this"); // bug lead to 'could not find dotted symbol' here } ) : any
>each : { (collection: string, callback: (indexInArray: any, valueOfElement: any) => any): any; (collection: JQuery, callback: (indexInArray: number, valueOfElement: Base) => any): any; }
>x.find(" ") : JQuery
>x.find : (selector: string) => JQuery
>x : JQuery
>find : (selector: string) => JQuery
>" " : " "
>function () { var $this: JQuery = $(''), thisBar = $this.find(".fx-usagebars-calloutbar-this"); // bug lead to 'could not find dotted symbol' here } : () => void
var $this: JQuery = $(''),
>$this : JQuery
>$('') : JQuery
>$ : JQueryStatic
>'' : ""
thisBar = $this.find(".fx-usagebars-calloutbar-this"); // bug lead to 'could not find dotted symbol' here
>thisBar : JQuery
>$this.find(".fx-usagebars-calloutbar-this") : JQuery
>$this.find : (selector: string) => JQuery
>$this : JQuery
>find : (selector: string) => JQuery
>".fx-usagebars-calloutbar-this" : ".fx-usagebars-calloutbar-this"
} );
}
|