TypeScript/tests/baselines/reference/binopAssignmentShouldHaveType.types

54 lines
881 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/binopAssignmentShouldHaveType.ts ===
declare var console;
>console : any
2014-08-15 23:33:16 +02:00
"use strict";
2015-04-13 21:36:11 +02:00
>"use strict" : string
2014-08-15 23:33:16 +02:00
module Test {
>Test : typeof Test
2014-08-15 23:33:16 +02:00
export class Bug {
>Bug : Bug
2014-08-15 23:33:16 +02:00
getName():string {
>getName : () => string
2014-08-15 23:33:16 +02:00
return "name";
2015-04-13 21:36:11 +02:00
>"name" : string
2014-08-15 23:33:16 +02:00
}
bug() {
>bug : () => void
2014-08-15 23:33:16 +02:00
var name:string= null;
>name : string
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00
if ((name= this.getName()).length > 0) {
>(name= this.getName()).length > 0 : boolean
>(name= this.getName()).length : number
2014-08-15 23:33:16 +02:00
>(name= this.getName()) : string
>name= this.getName() : string
>name : string
2014-08-15 23:33:16 +02:00
>this.getName() : string
>this.getName : () => string
>this : Bug
>getName : () => string
>length : number
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00
console.log(name);
>console.log(name) : any
>console.log : any
>console : any
2014-08-15 23:33:16 +02:00
>log : any
>name : string
2014-08-15 23:33:16 +02:00
}
}
}
}