Show exact error position in arrays & arrow functions · Issue #27030 · microsoft/TypeScript (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
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: ''}))
@DanielRosenwasser what do you think?