2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/contextuallyTypingOrOperator2.ts ===
|
|
|
|
var v: { a: (_: string) => number } = { a: s => s.length } || { a: s => 1 };
|
|
|
|
>v : { a: (_: string) => number; }
|
|
|
|
>a : (_: string) => number
|
|
|
|
>_ : string
|
2014-10-11 02:01:28 +02:00
|
|
|
>{ a: s => s.length } || { a: s => 1 } : { a: (s: string) => number; }
|
2014-08-15 23:33:16 +02:00
|
|
|
>{ a: s => s.length } : { a: (s: string) => number; }
|
|
|
|
>a : (s: string) => number
|
|
|
|
>s => s.length : (s: string) => number
|
|
|
|
>s : string
|
|
|
|
>s.length : number
|
|
|
|
>s : string
|
|
|
|
>length : number
|
|
|
|
>{ a: s => 1 } : { a: (s: string) => number; }
|
|
|
|
>a : (s: string) => number
|
|
|
|
>s => 1 : (s: string) => number
|
|
|
|
>s : string
|
|
|
|
|
|
|
|
var v2 = (s: string) => s.length || function (s) { s.aaa };
|
2014-10-18 01:53:18 +02:00
|
|
|
>v2 : (s: string) => number | ((s: any) => void)
|
|
|
|
>(s: string) => s.length || function (s) { s.aaa } : (s: string) => number | ((s: any) => void)
|
2014-08-15 23:33:16 +02:00
|
|
|
>s : string
|
2014-10-18 01:53:18 +02:00
|
|
|
>s.length || function (s) { s.aaa } : number | ((s: any) => void)
|
2014-08-15 23:33:16 +02:00
|
|
|
>s.length : number
|
|
|
|
>s : string
|
|
|
|
>length : number
|
|
|
|
>function (s) { s.aaa } : (s: any) => void
|
|
|
|
>s : any
|
|
|
|
>s.aaa : any
|
|
|
|
>s : any
|
|
|
|
>aaa : any
|
|
|
|
|