TypeScript/tests/cases/compiler/deepElaborationsIntoArrowExpressions.ts
Wesley Wigham f6321bf6d5
Elaborate into arrow return expressions and array types (#27040)
* Dive into simple arrow functions when elaborating errors

* Dive into array literals as though they were tuples when elaborating, if possible

* Make parameter required

* Remove misleading errors by deeply tuplefying

* Remove lib related spans
2018-09-17 16:45:54 -07:00

19 lines
252 B
TypeScript

// @target: es6
const a: {
y(): "a"
} = {
y: () => "b"
};
interface Foo {
a: number;
}
function foo1(): () => Foo {
return () => ({a: ''});
}
function foo3(): Foo[] {
return [{a: ''}];
}
var y: Foo[] = [{a: ''}]