Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow optional params instead of requiring explicit undefined param #503

Merged
merged 1 commit into from
Sep 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions support/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ declare namespace Cypress {
* cy.createMetamaskAccount()
* cy.createMetamaskAccount('accountName')
*/
createMetamaskAccount(accountName: string | undefined): Chainable<Subject>;
createMetamaskAccount(accountName?: string): Chainable<Subject>;
/**
* Switch metamask account
* @example
Expand Down Expand Up @@ -187,15 +187,15 @@ declare namespace Cypress {
* cy.acceptMetamaskAccess()
* cy.acceptMetamaskAccess(true)
*/
acceptMetamaskAccess(allAccounts: boolean | undefined): Chainable<Subject>;
acceptMetamaskAccess(allAccounts?: boolean): Chainable<Subject>;
/**
* Confirm metamask atransaction
* @example
* cy.confirmMetamaskTransaction()
* cy.confirmMetamaskTransaction({gasFee: 10, gasLimit: 1000000})
*/
confirmMetamaskTransaction(
gasConfig: object | undefined,
gasConfig?: object,
): Chainable<Subject>;
/**
* Reject metamask transaction
Expand All @@ -210,7 +210,7 @@ declare namespace Cypress {
* cy.allowMetamaskToAddNetwork('close') // (waitForEvent)
*/
allowMetamaskToAddNetwork(
waitForEvent: string | undefined,
waitForEvent?: string,
): Chainable<Subject>;
/**
* Reject site to add new network in metamask
Expand Down Expand Up @@ -300,7 +300,7 @@ declare namespace Cypress {
* cy.waitForResources([{name:"fonts.gstatic.com/s/worksans",number:2}])
*/
waitForResources(
resources: Array<{ name: string; number?: number }> | undefined,
resources?: Array<{ name: string; number?: number }>,
): Chainable<Subject>;
/**
* Assert that element top is within viewport
Expand Down