Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: typescript interface updates #973

Merged
merged 4 commits into from
Jun 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions axe.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ declare module axe {

type ReporterVersion = "v1" | "v2";

type RunOnlyType = "rule" | "rules" | "tag" | "tags";
type RunOnlyType = "rule" | "rules" | "tag" | "tags";

type resultGroups = "inapplicable" | "passes" | "incomplete" | "violations";

Expand All @@ -19,13 +19,13 @@ declare module axe {
exclude?: string[] | string[][]
}

type RunCallback = (error: Error, results:AxeResults) => void;
type RunCallback = (error: Error, results: AxeResults) => void;

type ElementContext = Node | string | RunOnlyObject;

interface RunOnly {
type: RunOnlyType,
values?: TagValue[] | RunOnlyObject
values?: TagValue[] | string[]
}
interface RunOptions {
runOnly?: RunOnly,
Expand Down Expand Up @@ -103,12 +103,12 @@ declare module axe {
}
interface AxePlugin {
id: string,
run(...args:any[]): any,
run(...args: any[]): any,
commands: {
id: string,
callback(...args:any[]): void
callback(...args: any[]): void
}[],
cleanup?(callback:Function): void
cleanup?(callback: Function): void
}

let plugins: any
Expand All @@ -133,7 +133,7 @@ declare module axe {
*/
function run(context?: ElementContext): Promise<AxeResults>
function run(options: RunOptions): Promise<AxeResults>
function run(callback: (error: Error, results:AxeResults) => void): void
function run(callback: (error: Error, results: AxeResults) => void): void
function run(context: ElementContext, callback: RunCallback): void
function run(options: RunOptions, callback: RunCallback): void
function run(context: ElementContext, options: RunOptions): Promise<AxeResults>
Expand Down