TypeScript misconception: “If I need to rename a union type, the usages...


TypeScript misconception: “If I need to rename a union type, the usages won’t get updated.”

Reality: All usages of the union type can be safely updated. Just hit F2 to rename any union type's value. TypeScript knows where the union type is used, and updates them.

#typescript

View original on X