-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
No SymbolId
for declare class C {}
#7278
Comments
I couldn't figure out where in
but not
I need to debug binder.ts :-/ |
We need this to remove |
Ditto for the declare function |
I had a try to fix Here is how binder.ts handles this(binder is rare to be changed, should be fine to assume the line is not changed): The logic is not special. In fact, oxc chose to skip bind Will fix function in another PR if no one is interested/has time for it :) |
Another try to bind for However, there is still a missed function type called |
Not sure whether this is the right place to discuss detials...
In my opinion, they are problems need to be resolved for supporting TS, waiting for options from core team members... also cc @EliLichtblau, for who introduced "Ambient" as a member of "SymbolFlags" |
Yea - I wonder if ambient was in the definition of symbolFlags at the time I made the PR in tsc but I agree ambient should be associated with a node rather than a symbol |
I am not deep into this, so I don't know how to fix this, but we respect one principle is aligned with TypeScript. |
Semantic does not produce a
SymbolId
forC
indeclare class C {}
.I believe it should - all
BindingIdentifier
s should have aSymbolId
, and we do produceSymbolId
s for other TS-only identifiers e.g.type N = number;
.In this example, only
A
gets assigned aSymbolId
:Playground
Relevant code:
oxc/crates/oxc_semantic/src/binder.rs
Lines 103 to 118 in ff2a1d4
The text was updated successfully, but these errors were encountered: