From 027186734e8d744a19b6b9308e73aac04e2407dd Mon Sep 17 00:00:00 2001 From: Fionna Chan Date: Wed, 14 Sep 2022 14:52:47 +0000 Subject: [PATCH] fix: allow optional params instead of requiring explicit undefined param --- support/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/support/index.d.ts b/support/index.d.ts index 4637b6b0f..601374584 100644 --- a/support/index.d.ts +++ b/support/index.d.ts @@ -81,7 +81,7 @@ declare namespace Cypress { * cy.createMetamaskAccount() * cy.createMetamaskAccount('accountName') */ - createMetamaskAccount(accountName: string | undefined): Chainable; + createMetamaskAccount(accountName?: string): Chainable; /** * Switch metamask account * @example @@ -187,7 +187,7 @@ declare namespace Cypress { * cy.acceptMetamaskAccess() * cy.acceptMetamaskAccess(true) */ - acceptMetamaskAccess(allAccounts: boolean | undefined): Chainable; + acceptMetamaskAccess(allAccounts?: boolean): Chainable; /** * Confirm metamask atransaction * @example @@ -195,7 +195,7 @@ declare namespace Cypress { * cy.confirmMetamaskTransaction({gasFee: 10, gasLimit: 1000000}) */ confirmMetamaskTransaction( - gasConfig: object | undefined, + gasConfig?: object, ): Chainable; /** * Reject metamask transaction @@ -210,7 +210,7 @@ declare namespace Cypress { * cy.allowMetamaskToAddNetwork('close') // (waitForEvent) */ allowMetamaskToAddNetwork( - waitForEvent: string | undefined, + waitForEvent?: string, ): Chainable; /** * Reject site to add new network in metamask @@ -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; /** * Assert that element top is within viewport