Skip to content

Make PaymentRequest .show method param optional #44560

Closed
@dhaigh

Description

@dhaigh

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 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions