File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,9 @@ import {ARIARole} from 'aria-query'
3
3
export type MatcherFunction = ( content : string , element : HTMLElement ) => boolean
4
4
export type Matcher = string | RegExp | MatcherFunction
5
5
6
- // Allow `String` to have intellisense for roles while writing ByRole queries
7
- // If `string` is used it overrules the ARIARole string union types
8
- // resulting in no intellisense
9
- // We still want to support roles not included in the union type
10
- /* tslint:disable:ban-types */
11
- export type ByRoleMatcher = ARIARole | String | RegExp | MatcherFunction
6
+ // Get autocomplete for ARIARole union types, while still supporting another string
7
+ // Ref: https://github.com/microsoft/TypeScript/issues/29729#issuecomment-505826972
8
+ export type ByRoleMatcher = ARIARole | ( string & { } ) | RegExp | MatcherFunction
12
9
13
10
export type NormalizerFn = ( text : string ) => string
14
11
You can’t perform that action at this time.
0 commit comments