Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions inputfiles/patches/intersection-observer.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
removals {
interface IntersectionObserverEntry {
constructor // WebKit-only as of 2025-12
}
}
3 changes: 0 additions & 3 deletions inputfiles/removedTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
}
}
},
"IntersectionObserverEntry": {
"constructor": null // WebKit-only as of 2024-07
},
"OffscreenCanvasRenderingContext2D": {
"implements": ["CanvasSettings"] // Blink only as of 2025-01
},
Expand Down
10 changes: 7 additions & 3 deletions src/build/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ function handleMixinAndInterfaces(
return {
name,
...optionalNestedMember("events", event, { event }),
properties: { property },
methods: { method },
...optionalNestedMember("properties", property, { property }),
...optionalNestedMember("methods", method, { method }),
...optionalMember("extends", "string", node.properties?.extends),
...optionalMember("overrideThis", "string", node.properties?.overrideThis),
...optionalMember("forward", "string", node.properties?.forward),
Expand Down Expand Up @@ -348,7 +348,7 @@ function handleMethodAndConstructor(
const signatureIndex = child.properties?.signatureIndex;
const type = handleTyped(typeNodes, child.properties?.returns);

let signature: OverridableMethod["signature"] = [];
let signature: OverridableMethod["signature"] | undefined = undefined;
if (type || params.length > 0) {
// Determine the actual signature object
const signatureObj: DeepPartial<Signature> = {
Expand All @@ -360,6 +360,10 @@ function handleMethodAndConstructor(
} else {
signature = [signatureObj];
}
if (signatureObj.param?.length === 0 && !signatureObj.type) {
// If there are no params and no return type, remove the signature
signature = undefined;
}
}
return {
name,
Expand Down