Skip to content

Commit 80de793

Browse files
WilcoFiersstraker
andcommitted
fix(d.ts): RunOptions.reporter can be any string (#4218)
Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
1 parent f105266 commit 80de793

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

axe.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ declare namespace axe {
66

77
type TagValue = string;
88

9-
type ReporterVersion = 'v1' | 'v2' | 'raw' | 'raw-env' | 'no-passes';
9+
type ReporterVersion = 'v1' | 'v2' | 'raw' | 'rawEnv' | 'no-passes';
1010

1111
type RunOnlyType = 'rule' | 'rules' | 'tag' | 'tags';
1212

@@ -131,7 +131,7 @@ declare namespace axe {
131131
interface RunOptions {
132132
runOnly?: RunOnly | TagValue[] | string[] | string;
133133
rules?: RuleObject;
134-
reporter?: ReporterVersion;
134+
reporter?: ReporterVersion | string;
135135
resultTypes?: resultGroups[];
136136
selectors?: boolean;
137137
ancestry?: boolean;

typings/axe-core/axe-core-tests.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ import * as axe from '../../axe';
22

33
var context: any = document;
44
var $fixture = [document];
5-
var options = { iframes: false, selectors: false, elementRef: false };
5+
var options: axe.RunOptions = {
6+
iframes: false,
7+
selectors: false,
8+
elementRef: false
9+
};
10+
options.reporter = 'rawEnv';
11+
options.reporter = 'custom';
612

713
axe.run(context, {}, (error: Error, results: axe.AxeResults) => {
814
if (error) {

0 commit comments

Comments
 (0)