Repository navigation
Conversation
commit: |
2cc8bab to
70ceefd
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
c52ab19 to
4ce76a9
Compare
| (this: Target, event: Event): void; | ||
| } | ||
|
|
||
| export const EventTarget = globalThis.EventTarget; |
There was a problem hiding this comment.
why do we re-export these? 👀
There was a problem hiding this comment.
Mostly so that we can pass them in unambiguously to the test suite globals property, and so folks can un-ambiguously import them so there's no confusion about what we're getting. Shall we remove them?
| }; | ||
| export type Event = globalThis.Event; | ||
|
|
||
| export class DOMExecption extends Error { |
There was a problem hiding this comment.
| export class DOMExecption extends Error { | |
| export class DOMException extends Error { |
|
|
||
| // Node exposes these constants at runtime, but its type declarations omit them. | ||
| export const Event = globalThis.Event as typeof globalThis.Event & { | ||
| readonly NONE: 0; |
There was a problem hiding this comment.
given its about as much code to re-declare these as it is to just have our own constants, what do you think about having our own constants?
i.e. const EVENT_NONE = 0 etc
otherwise i would try solve this through augmentation rather than casting. augment the global interface/class with the extra members etc
4ce76a9 to
25c3313
Compare
What does this PR do?
Add the DOM mutations and event dispatch needed to mount a framework into Clack's terminal document. The operations chosen to implement were those required by Preact 11
Type of change
Checklist
pnpm test)pnpm format)AI-generated code disclosure