Show exact error position in arrays & arrow functions · Issue #27030 · microsoft/TypeScript (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@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 { return Promise.resolve({a: ''}); }

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

agdagag

@DanielRosenwasser what do you think?