Skip to content

Commit

Permalink
fix: allow optional params instead of requiring explicit undefined param
Browse files Browse the repository at this point in the history
  • Loading branch information
fionnachan committed Sep 14, 2022
1 parent 7fba74d commit 0271867
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 0271867

Please sign in to comment.