=== tests/cases/compiler/propagationOfPromiseInitialization.ts === interface IPromise { >IPromise : IPromise >T : T then(successCallback: (promiseValue: T) => TResult, errorCallback?: (reason: any) => TResult): IPromise; >then : (successCallback: (promiseValue: T) => TResult, errorCallback?: (reason: any) => TResult) => IPromise >TResult : TResult >successCallback : (promiseValue: T) => TResult >promiseValue : T >T : T >TResult : TResult >errorCallback : (reason: any) => TResult >reason : any >TResult : TResult >IPromise : IPromise >TResult : TResult } var foo: IPromise; >foo : IPromise >IPromise : IPromise foo.then((x) => { >foo.then((x) => { // x is inferred to be a number return "asdf";}).then((x) => { // x is inferred to be string x.length; return 123;}) : IPromise >foo.then((x) => { // x is inferred to be a number return "asdf";}).then : (successCallback: (promiseValue: string) => TResult, errorCallback?: (reason: any) => TResult) => IPromise >foo.then((x) => { // x is inferred to be a number return "asdf";}) : IPromise >foo.then : (successCallback: (promiseValue: number) => TResult, errorCallback?: (reason: any) => TResult) => IPromise >foo : IPromise >then : (successCallback: (promiseValue: number) => TResult, errorCallback?: (reason: any) => TResult) => IPromise >(x) => { // x is inferred to be a number return "asdf";} : (x: number) => string >x : number // x is inferred to be a number return "asdf"; >"asdf" : string }).then((x) => { >then : (successCallback: (promiseValue: string) => TResult, errorCallback?: (reason: any) => TResult) => IPromise >(x) => { // x is inferred to be string x.length; return 123;} : (x: string) => number >x : string // x is inferred to be string x.length; >x.length : number >x : string >length : number return 123; >123 : number });