Skip to content

Commit

Permalink
Merge pull request #503 from fionnachan/fix-types
Browse files Browse the repository at this point in the history
fix: allow optional params instead of requiring explicit undefined param
  • Loading branch information
drptbl authored Sep 14, 2022
2 parents 7fba74d + 0271867 commit f0fc8d6
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 f0fc8d6

Please sign in to comment.