26// Alternatively, can be defined in cypress/support/component.d.ts
27// with a <reference path="./component" /> at the top of your spec.
28declare global {
29 namespace Cypress {30 interface Chainable {31 mount: typeof mount32 }33 }34}
35
36Cypress.Commands.add('mount', mount)
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' {}