-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
Creating separate issue so it's not forgotten.
As this stands at the moment, it won't flow through to the runtime type library. (If you do
deno --typesyou will see it is missing).
The interface is already a global interface (
interface ImportMeta {}) as it has been reserved in the language for a long time. We need to extend this interface in the global scope, which is what happens when it is located inlib.web_assembly.d.tsfile as that is simply inlined in the runtime type library, but that isn't the "right" way to do it for extending this in the long term. I think it is better that we put this directly in theglobals.ts, the only problem is that we need to changets_library_builderin themergeGlobalfunction to copy over any interfaces there into the type library.
That is a bit complicated, so if you wanted to, just move it back to the web assembly library, and then I can do a follow up PR making the change to
ts_library_builder. Otherwise you can try to tackle it. It should be added somewhere around here and needs to be done is iterate over any interfaces, ensuring it weeds out the specialglobalinterface and adds those to the target.
Originally posted by @kitsonk in #1835 (comment)
I'll tackle that