diff options
author | Nayeem Rahman <muhammed.9939@gmail.com> | 2019-09-17 17:17:12 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-09-17 12:17:12 -0400 |
commit | e55e4a2838e0f67cd0789ec4d3eec62a5b7ab238 (patch) | |
tree | fdedfb5b0aa5fe35dc0021d170e7eabd66426b98 /js/globals.ts | |
parent | 9cfdc60a23e6418d4780dc3ebd6266248555bb03 (diff) |
Remove some non-standard web API constructors (#2970)
This removes the EventListener, EventInit and CustomEventInit constructors from the userland globals. The type exports stay.
I removed the internal classes as well. EventListener's implementation seemed to be doing some bookkeeping on handled events but that's not being used anywhere so I assume it's old debug stuff. The other two are completely redundant.
Diffstat (limited to 'js/globals.ts')
-rw-r--r-- | js/globals.ts | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/js/globals.ts b/js/globals.ts index e9479b4a5..1c84a17f5 100644 --- a/js/globals.ts +++ b/js/globals.ts @@ -97,29 +97,26 @@ window.crypto = (csprng as unknown) as Crypto; // We have to export the type aliases, so that TypeScript _knows_ they are // being used, which it cannot statically determine within this module. window.Blob = blob.DenoBlob; -export type Blob = blob.DenoBlob; +export type Blob = domTypes.Blob; export type Body = domTypes.Body; window.File = domFile.DenoFile as domTypes.DomFileConstructor; export type File = domTypes.DomFile; -window.CustomEventInit = customEvent.CustomEventInit; -export type CustomEventInit = customEvent.CustomEventInit; +export type CustomEventInit = domTypes.CustomEventInit; window.CustomEvent = customEvent.CustomEvent; -export type CustomEvent = customEvent.CustomEvent; -window.EventInit = event.EventInit; -export type EventInit = event.EventInit; +export type CustomEvent = domTypes.CustomEvent; +export type EventInit = domTypes.EventInit; window.Event = event.Event; -export type Event = event.Event; -window.EventListener = eventTarget.EventListener; -export type EventListener = eventTarget.EventListener; +export type Event = domTypes.Event; +export type EventListener = domTypes.EventListener; window.EventTarget = eventTarget.EventTarget; -export type EventTarget = eventTarget.EventTarget; +export type EventTarget = domTypes.EventTarget; window.URL = url.URL; export type URL = url.URL; window.URLSearchParams = urlSearchParams.URLSearchParams; -export type URLSearchParams = urlSearchParams.URLSearchParams; +export type URLSearchParams = domTypes.URLSearchParams; // Using the `as` keyword to use standard compliant interfaces as the Deno // implementations contain some implementation details we wouldn't want to |