Skip to content

Commit 8f5ab49

Browse files
committed
-
1 parent 3f96aea commit 8f5ab49

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/build/patches.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
Property,
66
Interface,
77
WebIdl,
8-
Method as originalMethod,
8+
Method,
99
Typed,
1010
Dictionary,
1111
Member,
@@ -18,8 +18,8 @@ type DeepPartial<T> = T extends object
1818
? { [K in keyof T]?: DeepPartial<T[K]> }
1919
: T;
2020

21-
interface Method extends Omit<originalMethod, "signature"> {
22-
signature: DeepPartial<Signature>[] | Record<string, DeepPartial<Signature>>;
21+
interface OverridableMethod extends Omit<Method, "signature"> {
22+
signature: DeepPartial<Signature>[] | Record<number, DeepPartial<Signature>>;
2323
}
2424

2525
function optionalMember<const T>(prop: string, type: T, value?: Value) {
@@ -159,7 +159,7 @@ function handleMixinandInterfaces(
159159

160160
const event: Event[] = [];
161161
const property: Record<string, Partial<Property>> = {};
162-
let method: Record<string, DeepPartial<Method>> = {};
162+
let method: Record<string, DeepPartial<OverridableMethod>> = {};
163163

164164
for (const child of node.children) {
165165
switch (child.name) {
@@ -246,7 +246,7 @@ function handleProperty(child: Node): Partial<Property> {
246246
* Handles a child node of type "method" and adds it to the method object.
247247
* @param child The child node to handle.
248248
*/
249-
function handleMethod(child: Node): DeepPartial<Method> {
249+
function handleMethod(child: Node): DeepPartial<OverridableMethod> {
250250
const name = string(child.values[0]);
251251

252252
let typeNode: Node | undefined;
@@ -284,7 +284,7 @@ function handleMethod(child: Node): DeepPartial<Method> {
284284
}),
285285
};
286286

287-
let signature: Method["signature"];
287+
let signature: OverridableMethod["signature"];
288288
const signatureIndex = child.properties?.signatureIndex;
289289
if (typeof signatureIndex == "number") {
290290
signature = { [signatureIndex]: signatureObj };

0 commit comments

Comments
 (0)