TypeStrong / atom-typescript

The only TypeScript package you will ever need
https://atom.io/packages/atom-typescript
MIT License
1.13k stars 205 forks source link

Autocomplete for object destructuring in arrow function is bugged #1528

Closed senyaak closed 4 years ago

senyaak commented 4 years ago

For example we have following code

([{a:1},{a:2},{a:3}] as {a: number}[]).forEach(({})=>null);

If you place pointer between '{' and '}' and then hit alt+space - autocomplete breaks the function. What I expect

([{a:1},{a:2},{a:3}] as {a: number}[]).forEach(({a})=>null);

What I get

([{a:1},{a:2},{a:3}] as {a: number}[]).forEacha})=>null);

PS Atom 1.41.0 Atom-Typescript 13.4.0

lierdakil commented 4 years ago

Thanks for reporting! Should be fixed in v13.4.1.

senyaak commented 4 years ago

Thank you for quick fix! @lierdakil But unfortunately there some bug in fix. Console says: Uncaught (in promise) Error: Cannot find module './misc'

lierdakil commented 4 years ago

Huh. Ouch. Yup, sorry, that was my bad. Hopefully fixed in v13.4.3

lierdakil commented 4 years ago

Augh. Sorry, found another issue with the new implementation, when prefix with mismatched case wouldn't be replaced. v13.4.4 should be good.