139});
140
141declare global {
142 namespace Cypress {143 interface Chainable<Subject> {144 getOauth2Data(): Cypress.Chainable;145 oauthLogin(oauth2Data: any, username: string, password: string): Cypress.Chainable;146 keycloakLogin(oauth2Data: any, username: string, password: string): Cypress.Chainable;147 auth0Login(oauth2Data: any, username: string, password: string): Cypress.Chainable;148 oktaLogin(oauth2Data: any, username: string, password: string): Cypress.Chainable;149 oauthLogout(): Cypress.Chainable;150 }151 }152}
153
154// Convert this to a module instead of script (allows import/export)
Custom TypeScript modules (module foo {}
) and namespaces (namespace foo {}
) are considered outdated ways to organize TypeScript code. ES2015 module syntax is now preferred (import/export
).
This rule still allows the use of TypeScript module declarations to describe external APIs (declare module 'foo' {}
).
module foo {}
namespace foo {}
declare module foo {}
declare namespace foo {}
declare module 'foo' {}