File-based scoping
#1451
-
Are there any examples of scoping names to the file? Neither of scoping guides does this. I don't want to do gimme teh codez, but this is a common enough language feature that I am guessing someone out there has a DSL with file-based scoping already. |
Beta Was this translation helpful? Give feedback.
Answered by
drhagen
Apr 12, 2024
Replies: 1 comment 3 replies
-
What do you mean by that? No references to other files? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overriding
getGlobalScope
and returning an empty scope works. Here's the minimal code for modifying the Hello World project to enforce file-scoping.Add file
hello-world-scope-provider.ts
with contents:Like in the other examples modify
HelloWorldModule
inhello-world-module.ts
to inject this scope provider: