Closed
Description
const foo = { bar: 1 as const };
const bar: number = foo.bar;
// Currently fixed to
const { bar } = foo;
- Fixer should change code to
const { bar }: { bar: number } = foo
, removing type annotation is unsafe - I think it would make sense to add an option to disable rule in this case, annotations on destructured variables aren't very pretty