forked from dequelabs/react-axe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
31 lines (29 loc) · 904 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// @types/requestidlecallback can only be used as a global (it doesn't export
// anything) so we need to declare a module for it
// @see https://github.com/Microsoft/TypeScript/issues/11420
declare module 'requestidlecallback' {
export function request(
callback: IdleRequestCallback,
options?: IdleRequestOptions
): IdleCallbackHandle;
export function cancel(handle: number): void;
}
// @reference axe-corehttps://github.com/dequelabs/axe-core/blob/develop/lib/core/base/audit.js
declare type AxeCoreNodeResultKey = 'any' | 'all' | 'none';
declare interface AxeWithAudit {
_audit: {
data: {
failureSummaries: {
any: {
failureMessage: (args: string[]) => string;
};
all: {
failureMessage: (args: string[]) => string;
};
none: {
failureMessage: (args: string[]) => string;
};
};
};
};
}