TypeScript Version: 4.2.0-dev.20201109
Search Terms:
String literal rename
Code
type Actions = { type: 'one', payload: number } | { type: 'two', payload: boolean }
const q: Actions = { type: 'one', payload: 1 }
Expected behavior:
Renaming of values of 'type' fields should also rename the value in actual variable. For example if I rename 'one' in the type Actions TS should also rename the value of type field in q variable, and vice versa.
Actual behavior:
Looks like renaming doesn't start at all
Playground Link:
https://www.typescriptlang.org/play?ts=4.2.0-dev.20201109#code/C4TwDgpgBAggxsAlgewHYGcoF4oG8qiQBcUA5GhKQDRRgCGIANsnQCYmoCuAtgEYQAnKAF8oAHzwFwEEqWAB3ZNVoNmbEr2TJGEOqhEAoOGnTAoARxLwkJ7JMIyyFZfSYt2UAIwigA
Related Issues:
#5602
#39298
TypeScript Version: 4.2.0-dev.20201109
Search Terms:
String literal rename
Code
Expected behavior:
Renaming of values of 'type' fields should also rename the value in actual variable. For example if I rename
'one'in the typeActionsTS should also rename the value oftypefield inqvariable, and vice versa.Actual behavior:
Looks like renaming doesn't start at all
Playground Link:
https://www.typescriptlang.org/play?ts=4.2.0-dev.20201109#code/C4TwDgpgBAggxsAlgewHYGcoF4oG8qiQBcUA5GhKQDRRgCGIANsnQCYmoCuAtgEYQAnKAF8oAHzwFwEEqWAB3ZNVoNmbEr2TJGEOqhEAoOGnTAoARxLwkJ7JMIyyFZfSYt2UAIwigA
Related Issues:
#5602
#39298