Closed lordnox closed 6 years ago
Example Code:
interface ITest { x: number } const createTest = (): ITest => { const x = Math.random() return { x, } }
When trying to rename const x to const rnd the code will become:
const x
const rnd
interface ITest { x: number } const createTest = (): ITest => { const rnd = Math.random() return { rnd, } }
This does kind of do the right thing, but changes the return type of the function and should actually become:
interface ITest { x: number } const createTest = (): ITest => { const rnd = Math.random() return { x: rnd, } }
This issue was moved to Microsoft/TypeScript#27189
Example Code:
When trying to rename
const x
toconst rnd
the code will become:This does kind of do the right thing, but changes the return type of the function and should actually become: