Skip to content

Show exact error position in arrays & arrow functions #27030

Closed
@cevek

Description

@cevek

If it is not assignable error and infered expression type origin comes from inside of ast error boundaries we can show exact position of an error source

interface Foo {
    a: number;
}

function foo1(): () => Foo {
    return () => ({a: ''});
}

function foo2(): Promise<Foo> {
    return Promise.resolve({a: ''});
}

function foo3(): Foo[] {
    return [{a: ''}];
}
var y: Foo[] = [{a: ''}] 
var z: Foo[] = [].map(() => ({a: ''}))

agdagag

@DanielRosenwasser what do you think?

Metadata

Metadata

Assignees

Labels

Domain: Error MessagesThe issue relates to error messagingExperience EnhancementNoncontroversial enhancementsFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions