Open
Description
I would very much appreciate having a codefix (refactoring) that, given an explicit any
annotation, offers to change it to an {}
annotation.
For example, given
function log(x: any) {
console.log(x);
}
a code fix would be offered to change the declared type of x
to {}
resulting in
function log(x: {}) {
console.log(x);
}
However, given
function log(x: any) {
console.log(x.name);
}
a code fix would be offered to change the declared type of x
to { name: any }
resulting in
function log(x: {name: any}) {
console.log(x);
}