You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the d.ts file do generate names in the global file scope. If such a name is redefined inside an interface it will shadow the name in the file scope and might lead to incorrect d.ts files. We should instead use * imports with a $ prefixed name and define types inside the corresponding namespace. For example wasi-clocks-timezone.d.ts could look like this:
The text was updated successfully, but these errors were encountered:
dbaeumer
changed the title
Don't generate names in the global file scope for d.ts to avoid name shadowing
We should avoid generating names in the global file scope for d.ts to avoid name shadowing
Sep 20, 2023
Currently the
d.ts
file do generate names in the global file scope. If such a name is redefined inside an interface it will shadow the name in the file scope and might lead to incorrectd.ts
files. We should instead use*
imports with a$
prefixed name and define types inside the corresponding namespace. For examplewasi-clocks-timezone.d.ts
could look like this:The text was updated successfully, but these errors were encountered: