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
This issue isn't fixed for other symbols declared with declare class, which I think we decided to favour in the past. Seems like only declare var is accessible on globalThis, I think we need an upstream solution: microsoft/TypeScript#39504. cc @caspervonb@kitsonk
In microsoft/TypeScript#39504, @ExE-Boss points out that declare class can't be accessible on globalThis because it contradicts JS semantics. Experimentation with V8 shows that it implements the semantics the same way.
@sandersn As similarly discussed in that issue we are looking for some other way to declare a class object which is accessible from globalThis e.g. declare var Foo: typeof class Foo {} doesn't work. A var class Foo {} syntax is proposed there.
Note that we specifically want to use class instead of
This issue isn't fixed for other symbols declared with
declare class
, which I think we decided to favour in the past. Seems like onlydeclare var
is accessible onglobalThis
, I think we need an upstream solution: microsoft/TypeScript#39504. cc @caspervonb @kitsonkOriginally posted by @nayeemrmn in #5666 (comment)
The text was updated successfully, but these errors were encountered: