-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Resolve the decorator type as type and check if the symbol has value. #4386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This would make sure we are referencing correct symbol to check if it has value Fixes #4239
let rootSymbol = resolveName(root, root.text, SymbolFlags.Value, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); | ||
if (rootSymbol && rootSymbol.flags & SymbolFlags.Alias && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol))) { | ||
markAliasSymbolAsReferenced(rootSymbol); | ||
var meaning = root.parent.kind === SyntaxKind.TypeReference ? SymbolFlags.Type : SymbolFlags.Namespace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure i understand this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is M.Q then resolving M has to be like namespace. While if it is T , T need sto be resolved as type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use let
Please add more tests |
👍 but please add some more tests for the namespace/dotted name case. this area does not have enough coverage. |
…ource file This fixes issue of not being able to emit qualified expression correctly
…e resolved This could be true if expression cannot be resolved resulting in error
👍 |
Resolve the decorator type as type and check if the symbol has value.
This would make sure we are referencing correct symbol to check if it has value
Fixes #4239