Title: Make PaymentRequest .show method param optional · Issue #44560 · microsoft/TypeScript · GitHub
Open Graph Title: Make PaymentRequest .show method param optional · Issue #44560 · microsoft/TypeScript
X Title: Make PaymentRequest .show method param optional · Issue #44560 · microsoft/TypeScript
Description: Bug Report #44423 added types for the promise param on the .show() method on PaymentRequest. The spec states that this parameter is optional #44559 🔎 Search Terms show method PaymentRequest 🕗 Version & Regression Information not present ...
Open Graph Description: Bug Report #44423 added types for the promise param on the .show() method on PaymentRequest. The spec states that this parameter is optional #44559 🔎 Search Terms show method PaymentRequest 🕗 Versi...
X Description: Bug Report #44423 added types for the promise param on the .show() method on PaymentRequest. The spec states that this parameter is optional #44559 🔎 Search Terms show method PaymentRequest 🕗 Versi...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/44560
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Make PaymentRequest .show method param optional","articleBody":"# Bug Report\r\n\r\n#44423 added types for the promise param on the `.show()` method on `PaymentRequest`. [The spec states that this parameter is optional](https://www.w3.org/TR/payment-request/#show-method)\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/44559\r\n\r\n### 🔎 Search Terms\r\n\r\nshow method PaymentRequest\r\n\r\n### 🕗 Version & Regression Information\r\n\r\nnot present in 4.2.3, present in 4.3.2\r\n\r\n### ⏯ Playground Link\r\n\r\n[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.3.2#code/MYewdgzgLgBATgUwI4FcHRgXhgbwL4wCGEMACoQJ4C2CYUASsmtANwBQbA9JzBABYgUAGwAmMMCFgI4cEHDaJU6KADp+IAO4AKAJQsgA)\r\n\r\n### 💻 Code\r\n\r\nthe type definition just needs to be tweaked slightly\r\n\r\n```ts\r\n// current\r\n show(detailsPromise: PaymentDetailsUpdate | Promise\u003cPaymentDetailsUpdate>): Promise\u003cPaymentResponse>;\r\n\r\n// should be\r\n show(detailsPromise?: PaymentDetailsUpdate | Promise\u003cPaymentDetailsUpdate>): Promise\u003cPaymentResponse>;\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\n```ts\r\nawait request.show(); // error: An argument for 'detailsPromise' was not provided\r\n```\r\n### 🙂 Expected behavior\r\n\r\n```ts\r\nawait request.show(); // no error\r\n```","author":{"url":"https://github.com/dhaigh","@type":"Person","name":"dhaigh"},"datePublished":"2021-06-12T00:16:39Z","url":"https://github.com/microsoft/TypeScript/issues/44560"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:87f376d9-c3b1-7e79-de3c-17298454f0b4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3CA:1201C:C189B6:102F116:6B00F64D |
| html-safe-nonce | a759900e6b7fca4f5c7d7b599b99d7d6b60502aa8db1ab5c711b9fd9ed55f151 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0NBOjEyMDFDOkMxODlCNjoxMDJGMTE2OjZCMDBGNjREIiwidmlzaXRvcl9pZCI6Ijg3ODA0NTcxMDEwNzI4NTY2NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d995ee598fef67091438aa8b219ae720bc58449f4f328eeb58227be8daf34900 |
| hovercard-subject-tag | issue:919325762 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/44560/issue_layout |
| twitter:image | https://opengraph.githubassets.com/91b1292a58e3f75eb8f6d1c030046fff3f550066880857f344d9fb35bdbebd3d/microsoft/TypeScript/issues/44560 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/91b1292a58e3f75eb8f6d1c030046fff3f550066880857f344d9fb35bdbebd3d/microsoft/TypeScript/issues/44560 |
| og:image:alt | Bug Report #44423 added types for the promise param on the .show() method on PaymentRequest. The spec states that this parameter is optional #44559 🔎 Search Terms show method PaymentRequest 🕗 Versi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dhaigh |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width