Skip to content

Commit

Permalink
fix: CustomEvent generic type
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherry authored and jasnell committed Mar 5, 2024
1 parent 673e279 commit 7d5a1d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/workerd/api/basics.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ class CustomEvent: public Event {
JSG_RESOURCE_TYPE(CustomEvent) {
JSG_INHERIT(Event);
JSG_READONLY_PROTOTYPE_PROPERTY(detail, getDetail);
JSG_TS_OVERRIDE(<T = any> extends Event {
constructor(type: string, init?: CustomEventCustomEventInit);
get detail(): T;
});
}

void visitForMemoryInfo(jsg::MemoryTracker& tracker) const {
Expand Down

0 comments on commit 7d5a1d2

Please sign in to comment.