Skip to content

Commit 5447fa6

Browse files
author
Sunil Pai
authored
support typescript in rename-unsafe-lifecycles (#234)
Thanks to @skovy in #228, we have a fix for this codemod not working correctly for typescript files. Making this a separate commit/PR to unblock publishing.
1 parent d144045 commit 5447fa6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

transforms/rename-unsafe-lifecycles.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ export default (file, api, options) => {
5050
.find(j.MethodDefinition)
5151
.forEach(renameDeprecatedApis);
5252

53+
// Class methods - typescript
54+
root
55+
.find(j.ClassMethod)
56+
.forEach(renameDeprecatedApis);
57+
5358
// Arrow functions
5459
root
5560
.find(j.ClassProperty)

0 commit comments

Comments
 (0)