Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit aca7001

Browse files
committed
fix: look up symbol directly rather than via type
Summary: fixes #151 Reviewers: evmar Subscribers: typescript-eng Differential Revision: https://reviews.angular.io/D145
1 parent dec5082 commit aca7001

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.arcconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"base": "git:origin/master",
3+
"phabricator.uri" : "https://reviews.angular.io/"
4+
}

src/decorator-annotator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ClassRewriter extends Rewriter {
5757
if (param.type) {
5858
// param has a type provided, e.g. "foo: Bar".
5959
// Verify that "Bar" is a value (e.g. a constructor) and not just a type.
60-
let sym = this.typeChecker.getTypeAtLocation(param.type).getSymbol();
60+
let sym = this.typeChecker.getSymbolAtLocation(param.type);
6161
if (sym && (sym.flags & ts.SymbolFlags.Value)) {
6262
paramCtor = new TypeTranslator(this.typeChecker, param.type).symbolToString(sym);
6363
}

0 commit comments

Comments
 (0)