Skip to content

Commit a8e9c49

Browse files
rennyGclaude
andcommitted
Fix smart quotes in checkout.ts type literals
Replace Unicode curly quotes (U+2018/U+2019) with straight ASCII quotes on all type literal lines, which caused ESLint parse errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 68a6684 commit a8e9c49

1 file changed

Lines changed: 31 additions & 31 deletions

File tree

  • packages/ui-extensions/src/surfaces/checkout/api/checkout

packages/ui-extensions/src/surfaces/checkout/api/checkout/checkout.ts

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -412,13 +412,13 @@ export interface GiftCardChangeResultSuccess {
412412
*/
413413
export interface GiftCardChangeResultError {
414414
/**
415-
* Indicates that the gift card change couldnt be applied. Check the `message` property for details.
415+
* Indicates that the gift card change couldn't be applied. Check the `message` property for details.
416416
*/
417-
type: error;
417+
type: 'error';
418418

419419
/**
420420
* A message that explains the error. This message is useful for debugging.
421-
* It isnt localized and shouldnt be displayed to the buyer.
421+
* It isn't localized and shouldn't be displayed to the buyer.
422422
*/
423423
message: string;
424424
}
@@ -428,7 +428,7 @@ export interface MetafieldRemoveChange {
428428
/**
429429
* The type of the `MetafieldRemoveChange` API.
430430
*/
431-
type: removeMetafield;
431+
type: 'removeMetafield';
432432

433433
/**
434434
* The name of the metafield to remove.
@@ -446,7 +446,7 @@ export interface MetafieldRemoveCartChange {
446446
/**
447447
* Identifies this as a cart metafield removal. Set this when creating a change to delete an existing metafield by key and namespace.
448448
*/
449-
type: removeCartMetafield;
449+
type: 'removeCartMetafield';
450450

451451
/**
452452
* The name of the metafield to remove.
@@ -467,7 +467,7 @@ export interface MetafieldUpdateChange {
467467
/**
468468
* The type of the `MetafieldUpdateChange` API.
469469
*/
470-
type: updateMetafield;
470+
type: 'updateMetafield';
471471

472472
/** The name of the metafield to update. */
473473
key: string;
@@ -479,19 +479,19 @@ export interface MetafieldUpdateChange {
479479
value: string | number;
480480

481481
/**
482-
* The metafields information type.
482+
* The metafield's information type.
483483
*/
484-
valueType: integer | string | json_string;
484+
valueType: 'integer' | 'string' | 'json_string';
485485
}
486486

487487
/**
488-
* Creates or updates a cart [metafield](https://shopify.dev/docs/apps/build/custom-data/metafields). Pass this to `applyMetafieldChange()` to set a metafield value. If a metafield with the provided key and namespace doesnt already exist, then it gets created.
488+
* Creates or updates a cart [metafield](https://shopify.dev/docs/apps/build/custom-data/metafields). Pass this to `applyMetafieldChange()` to set a metafield value. If a metafield with the provided key and namespace doesn't already exist, then it gets created.
489489
*/
490490
export interface MetafieldUpdateCartChange {
491491
/**
492492
* Identifies this as a cart metafield creation or update. Set this when creating a change to set a metafield value.
493493
*/
494-
type: updateCartMetafield;
494+
type: 'updateCartMetafield';
495495

496496
/**
497497
* The metafield data to set on the cart. If a metafield with this key and namespace already exists, then its value is replaced.
@@ -507,7 +507,7 @@ export interface MetafieldUpdateCartChange {
507507
value: string;
508508

509509
/**
510-
* The metafields information type.
510+
* The metafield's information type.
511511
* See the [metafield types documentation](https://shopify.dev/docs/apps/build/custom-data/metafields/list-of-data-types) for a list of supported types.
512512
*/
513513
type: string;
@@ -517,10 +517,10 @@ export interface MetafieldUpdateCartChange {
517517
/**
518518
* The input for `applyMetafieldChange()`. Use the `type` property to specify the operation.
519519
*
520-
* - `MetafieldRemoveCartChange` (`type: removeCartMetafield`): Removes an existing cart [metafield](https://shopify.dev/docs/apps/build/custom-data/metafields).
521-
* - `MetafieldUpdateCartChange` (`type: updateCartMetafield`): Creates or updates a cart metafield.
522-
* - `MetafieldRemoveChange` (`type: removeMetafield`) - Removes an existing metafield.
523-
* - `MetafieldUpdateChange` (`type: updateMetafield`) - Creates or updates a metafield.
520+
* - `MetafieldRemoveCartChange` (`type: 'removeCartMetafield'`): Removes an existing cart [metafield](https://shopify.dev/docs/apps/build/custom-data/metafields).
521+
* - `MetafieldUpdateCartChange` (`type: 'updateCartMetafield'`): Creates or updates a cart metafield.
522+
* - `MetafieldRemoveChange` (`type: 'removeMetafield'`) - Removes an existing metafield.
523+
* - `MetafieldUpdateChange` (`type: 'updateMetafield'`) - Creates or updates a metafield.
524524
*/
525525
export type MetafieldChange =
526526
| MetafieldRemoveChange
@@ -529,27 +529,27 @@ export type MetafieldChange =
529529
| MetafieldUpdateCartChange;
530530

531531
/**
532-
* The result of a successful metafield change. The `type` property is `success`.
532+
* The result of a successful metafield change. The `type` property is `'success'`.
533533
*/
534534
export interface MetafieldChangeResultSuccess {
535535
/**
536536
* Indicates that the metafield change was applied successfully.
537537
*/
538-
type: success;
538+
type: 'success';
539539
}
540540

541541
/**
542542
* The result of a failed metafield change. Check the `message` property for details about what went wrong.
543543
*/
544544
export interface MetafieldChangeResultError {
545545
/**
546-
* Indicates that the metafield change couldnt be applied. Check the `message` property for details.
546+
* Indicates that the metafield change couldn't be applied. Check the `message` property for details.
547547
*/
548-
type: error;
548+
type: 'error';
549549

550550
/**
551551
* A message that explains the error. This message is useful for debugging.
552-
* It isnt localized and shouldnt be displayed to the buyer.
552+
* It isn't localized and shouldn't be displayed to the buyer.
553553
*/
554554
message: string;
555555
}
@@ -562,35 +562,35 @@ export type MetafieldChangeResult =
562562
| MetafieldChangeResultError;
563563

564564
/**
565-
* Updates the buyers shipping address on the checkout. Pass this to `applyShippingAddressChange()` to modify specific address fields without replacing the entire address.
565+
* Updates the buyer's shipping address on the checkout. Pass this to `applyShippingAddressChange()` to modify specific address fields without replacing the entire address.
566566
*/
567567
export interface ShippingAddressUpdateChange {
568568
/**
569569
* Identifies this as a shipping address update. This is the only supported change type for `applyShippingAddressChange()`.
570570
*/
571-
type: updateShippingAddress;
571+
type: 'updateShippingAddress';
572572

573573
/**
574574
* Fields to update in the shipping address. You only need to provide
575-
* values for the fields you want to update. Any fields you dont list
575+
* values for the fields you want to update. Any fields you don't list
576576
* keep their current values.
577577
*/
578578
address: Partial<ShippingAddress>;
579579
}
580580

581581
/**
582-
* The input for `applyShippingAddressChange()`. Currently only supports `ShippingAddressUpdateChange` (with `type: updateShippingAddress`).
582+
* The input for `applyShippingAddressChange()`. Currently only supports `ShippingAddressUpdateChange` (with `type: 'updateShippingAddress'`).
583583
*/
584584
export type ShippingAddressChange = ShippingAddressUpdateChange;
585585

586586
/**
587-
* The result of a successful shipping address change. The `type` property is `success` and `errors` is `null`.
587+
* The result of a successful shipping address change. The `type` property is `'success'` and `errors` is `null`.
588588
*/
589589
export interface ShippingAddressChangeResultSuccess {
590590
/**
591591
* Indicates that the shipping address change was applied successfully.
592592
*/
593-
type: success;
593+
type: 'success';
594594

595595
/**
596596
* Always `null` for a successful address change. Present so that you can
@@ -604,13 +604,13 @@ export interface ShippingAddressChangeResultSuccess {
604604
*/
605605
export interface ShippingAddressChangeFieldError {
606606
/**
607-
* The `MailingAddress` field that caused the error, such as `countryCode` or `zip`. The value is `undefined` if the error isnt specific to a single field.
607+
* The `MailingAddress` field that caused the error, such as `'countryCode'` or `'zip'`. The value is `undefined` if the error isn't specific to a single field.
608608
*/
609609
field?: keyof MailingAddress;
610610

611611
/**
612612
* A message that explains the error. This message is useful for debugging.
613-
* It isnt localized and shouldnt be displayed to the buyer.
613+
* It isn't localized and shouldn't be displayed to the buyer.
614614
*/
615615
message: string;
616616
}
@@ -620,9 +620,9 @@ export interface ShippingAddressChangeFieldError {
620620
*/
621621
export interface ShippingAddressChangeResultError {
622622
/**
623-
* Indicates that the shipping address change couldnt be applied. Check the `errors` array for field-level details.
623+
* Indicates that the shipping address change couldn't be applied. Check the `errors` array for field-level details.
624624
*/
625-
type: error;
625+
type: 'error';
626626

627627
/**
628628
* The list of field-level errors that prevented the address change. Each entry identifies which address field failed and why.
@@ -687,7 +687,7 @@ export interface CheckoutApi {
687687
applyMetafieldChange(change: MetafieldChange): Promise<MetafieldChangeResult>;
688688

689689
/**
690-
* Sets or removes the buyers note on the checkout. On success, the
690+
* Sets or removes the buyer's note on the checkout. On success, the
691691
* [`note`](https://shopify.dev/docs/api/checkout-ui-extensions/{API_VERSION}/apis/note#standardapi-propertydetail-note)
692692
* property updates to reflect the change.
693693
*

0 commit comments

Comments
 (0)