Skip to content

Commit 0a38f9e

Browse files
authored
Migrate payment related interfaces & Support Interface rename (#2229)
1 parent 6253970 commit 0a38f9e

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

inputfiles/overridingTypes.jsonc

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3315,9 +3315,6 @@
33153315
}
33163316
}
33173317
},
3318-
"ContactAddress": {
3319-
"name": "PaymentAddress"
3320-
},
33213318
"HTMLMediaElement": {
33223319
"properties": {
33233320
"property": {
@@ -3364,27 +3361,6 @@
33643361
"exposed": "Window"
33653362
},
33663363

3367-
// Payment Request added shippingAddress with a different type
3368-
// https://github.com/w3c/payment-request/pull/996
3369-
"PaymentRequest": {
3370-
"properties": {
3371-
"property": {
3372-
"shippingAddress": {
3373-
"type": "PaymentAddress"
3374-
}
3375-
}
3376-
}
3377-
},
3378-
"PaymentResponse": {
3379-
"properties": {
3380-
"property": {
3381-
"shippingAddress": {
3382-
"type": "PaymentAddress"
3383-
}
3384-
}
3385-
}
3386-
},
3387-
33883364
"SourceBuffer": {
33893365
"exposed": "Window"
33903366
},
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Payment Request added shippingAddress with a different type
2+
// https://github.com/w3c/payment-request/pull/996
3+
4+
interface ContactAddress name=PaymentAddress
5+
6+
interface PaymentRequest {
7+
property shippingAddress type=PaymentAddress
8+
}
9+
interface PaymentResponse {
10+
property shippingAddress type=PaymentAddress
11+
}

src/build/patches.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function handleMixinandInterfaces(
143143
node: Node,
144144
type: "mixin" | "interface",
145145
): DeepPartial<Interface> {
146-
const name = node.values[0];
146+
const name = string(node.properties?.name || node.values[0]);
147147

148148
const event: Event[] = [];
149149
const property: Record<string, Partial<Property>> = {};

0 commit comments

Comments
 (0)