Closed
Description
Bug Report
#44423 added types for the promise param on the .show()
method on PaymentRequest
. The spec states that this parameter is optional
🔎 Search Terms
show method PaymentRequest
🕗 Version & Regression Information
not present in 4.2.3, present in 4.3.2
⏯ Playground Link
Playground link with relevant code
💻 Code
the type definition just needs to be tweaked slightly
// current
show(detailsPromise: PaymentDetailsUpdate | Promise<PaymentDetailsUpdate>): Promise<PaymentResponse>;
// should be
show(detailsPromise?: PaymentDetailsUpdate | Promise<PaymentDetailsUpdate>): Promise<PaymentResponse>;
🙁 Actual behavior
await request.show(); // error: An argument for 'detailsPromise' was not provided
🙂 Expected behavior
await request.show(); // no error