Files
tsgo/testdata/baselines/reference/submodule/compiler/deepElaborationsIntoArrowExpressions.errors.txt

37 lines
1.7 KiB
Plaintext

deepElaborationsIntoArrowExpressions.ts(4,14): error TS2322: Type '"b"' is not assignable to type '"a"'.
deepElaborationsIntoArrowExpressions.ts(12,20): error TS2322: Type 'string' is not assignable to type 'number'.
deepElaborationsIntoArrowExpressions.ts(16,14): error TS2322: Type 'string' is not assignable to type 'number'.
deepElaborationsIntoArrowExpressions.ts(18,18): error TS2322: Type 'string' is not assignable to type 'number'.
==== deepElaborationsIntoArrowExpressions.ts (4 errors) ====
const a: {
y(): "a"
} = {
y: () => "b"
~~~
!!! error TS2322: Type '"b"' is not assignable to type '"a"'.
!!! related TS6502 deepElaborationsIntoArrowExpressions.ts:2:5: The expected type comes from the return type of this signature.
};
interface Foo {
a: number;
}
function foo1(): () => Foo {
return () => ({a: ''});
~
!!! error TS2322: Type 'string' is not assignable to type 'number'.
!!! related TS6500 deepElaborationsIntoArrowExpressions.ts:8:5: The expected type comes from property 'a' which is declared here on type 'Foo'
}
function foo3(): Foo[] {
return [{a: ''}];
~
!!! error TS2322: Type 'string' is not assignable to type 'number'.
!!! related TS6500 deepElaborationsIntoArrowExpressions.ts:8:5: The expected type comes from property 'a' which is declared here on type 'Foo'
}
var y: Foo[] = [{a: ''}]
~
!!! error TS2322: Type 'string' is not assignable to type 'number'.
!!! related TS6500 deepElaborationsIntoArrowExpressions.ts:8:5: The expected type comes from property 'a' which is declared here on type 'Foo'