Skip to content

Commit

Permalink
Upgrade TypeScript to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Timokhov committed Sep 23, 2021
1 parent b32d344 commit 9dc7f05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"homepage": "https://github.com/timocov/ts-transformer-properties-rename",
"peerDependencies": {
"typescript": ">=3.0.0"
"typescript": ">=3.0.0 || >=4.0.0"
},
"devDependencies": {
"@types/chai": "~4.2.11",
Expand All @@ -38,7 +38,7 @@
"rimraf": "~3.0.2",
"ts-node": "~8.10.2",
"tslint": "~6.1.2",
"typescript": "~3.9.5"
"typescript": "~4.4.3"
},
"scripts": {
"clean": "rimraf lib/ dist/",
Expand Down
3 changes: 2 additions & 1 deletion src/typescript-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ export function getClassOfMemberSymbol(nodeSymbol: ts.Symbol): ts.ClassLikeDecla
return (classMember.parent as ts.ConstructorDeclaration).parent;
}

return classMember.parent;
// we're sure that it is a class, not interface
return classMember.parent as ts.ClassLikeDeclaration | ts.ObjectLiteralExpression;
}

return null;
Expand Down

0 comments on commit 9dc7f05

Please sign in to comment.