You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var i11Ori21: I11 | I21 = { // Like i1 and i2 both
120
120
commonMethodDifferentReturnType: (a, b) => strOrNumber,
121
121
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122
-
!!! error TS2322: Type '(a: string, b: number) => string | number' is not assignable to type '((a: string, b: number) => number) | ((a: string, b: number) => string)'.
123
-
!!! error TS2322: Type '(a: string, b: number) => string | number' is not assignable to type '(a: string, b: number) => number'.
124
-
!!! error TS2322: Type 'string | number' is not assignable to type 'number'.
125
-
!!! error TS2322: Type 'string' is not assignable to type 'number'.
122
+
!!! error TS2322: Type '(a: string, b: number) => string | number' is not assignable to type '((a: string, b: number) => string) | ((a: string, b: number) => number)'.
123
+
!!! error TS2322: Type '(a: string, b: number) => string | number' is not assignable to type '(a: string, b: number) => string'.
124
+
!!! error TS2322: Type 'string | number' is not assignable to type 'string'.
125
+
!!! error TS2322: Type 'number' is not assignable to type 'string'.
126
126
!!! related TS6500 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:35:5: The expected type comes from property 'commonMethodDifferentReturnType' which is declared here on type 'I11 | I21'
0 commit comments