diff --git a/types/cypress-axe/index.d.ts b/types/cypress-axe/index.d.ts index 507a5f773d..3ba776e14f 100644 --- a/types/cypress-axe/index.d.ts +++ b/types/cypress-axe/index.d.ts @@ -1,12 +1,21 @@ -// Type definitions for cypress-axe 0.3 +// Type definitions for cypress-axe 0.4 // Project: https://github.com/avanslaars/cypress-axe#readme // Definitions by: Justin Hall // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -declare namespace Cypress { - interface Chainable { - injectAxe(): void; - checkA11y(): void; +import { ElementContext, RunOptions } from 'axe-core'; + +declare module 'axe-core' { + interface Node {} +} + +declare global { + namespace Cypress { + interface Chainable { + injectAxe(): void; + checkA11y(context?: ElementContext, options?: RunOptions): void; + configureAxe(options?: RunOptions): void; + } } } diff --git a/types/cypress-axe/package.json b/types/cypress-axe/package.json new file mode 100644 index 0000000000..71df6dd355 --- /dev/null +++ b/types/cypress-axe/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "axe-core": "^3.1.2" + } +} diff --git a/types/cypress-axe/tslint.json b/types/cypress-axe/tslint.json index 3db14f85ea..4f44991c3c 100644 --- a/types/cypress-axe/tslint.json +++ b/types/cypress-axe/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-empty-interface": false + } +}