Skip to content

Commit 9fc4f91

Browse files
committed
fix: remove declare in types
1 parent bce30bf commit 9fc4f91

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

types/queries.d.ts

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Matcher, MatcherOptions } from './matches'
2-
import { SelectorMatcherOptions } from './query-helpers'
3-
import { waitForOptions } from './wait-for'
4-
import { ARIARole } from 'aria-query'
1+
import {Matcher, MatcherOptions} from './matches'
2+
import {SelectorMatcherOptions} from './query-helpers'
3+
import {waitForOptions} from './wait-for'
4+
import {ARIARole} from 'aria-query'
55

66
export type QueryByBoundAttribute = (
77
container: HTMLElement,
@@ -93,64 +93,67 @@ export interface ByRoleOptions extends MatcherOptions {
9393
| ((accessibleName: string, element: Element) => boolean)
9494
}
9595

96-
export declare function AllByRole(
96+
// disable unified-signatures to have intellisense for aria roles
97+
/* tslint:disable:unified-signatures */
98+
export function AllByRole(
9799
container: HTMLElement,
98100
role: Matcher,
99101
options?: ByRoleOptions,
100102
): HTMLElement[]
101-
export declare function AllByRole(
103+
export function AllByRole(
102104
container: HTMLElement,
103105
role: ARIARole,
104106
options?: ByRoleOptions,
105107
): HTMLElement[]
106108

107-
export declare function GetByRole(
109+
export function GetByRole(
108110
container: HTMLElement,
109111
role: Matcher,
110112
options?: ByRoleOptions,
111113
): HTMLElement
112-
export declare function GetByRole(
114+
export function GetByRole(
113115
container: HTMLElement,
114116
role: ARIARole,
115117
options?: ByRoleOptions,
116118
): HTMLElement
117119

118-
export declare function QueryByRole(
120+
export function QueryByRole(
119121
container: HTMLElement,
120122
role: Matcher | ByRoleOptions,
121123
options?: ByRoleOptions,
122124
): HTMLElement | null
123-
export declare function QueryByRole(
125+
export function QueryByRole(
124126
container: HTMLElement,
125127
role: ARIARole,
126128
options?: ByRoleOptions,
127129
): HTMLElement | null
128130

129-
export declare function FindByRole(
131+
export function FindByRole(
130132
container: HTMLElement,
131133
role: Matcher,
132134
options?: ByRoleOptions,
133135
waitForElementOptions?: waitForOptions,
134136
): Promise<HTMLElement>
135-
export declare function FindByRole(
137+
export function FindByRole(
136138
container: HTMLElement,
137139
role: ARIARole,
138140
options?: ByRoleOptions,
139141
waitForElementOptions?: waitForOptions,
140142
): Promise<HTMLElement>
141143

142-
export declare function FindAllByRole(
144+
export function FindAllByRole(
143145
container: HTMLElement,
144146
role: Matcher,
145147
options?: ByRoleOptions,
146148
waitForElementOptions?: waitForOptions,
147149
): Promise<HTMLElement[]>
148-
export declare function FindAllByRole(
150+
export function FindAllByRole(
149151
container: HTMLElement,
150152
role: Matcher,
151153
options?: ByRoleOptions,
152154
waitForElementOptions?: waitForOptions,
153155
): Promise<HTMLElement[]>
156+
/* tslint:enable */
154157

155158
export const getByLabelText: GetByText
156159
export const getAllByLabelText: AllByText

types/tslint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"rules": {
44
"no-useless-files": false,
55
"no-relative-import-in-test": false,
6-
"semicolon": false
6+
"semicolon": false,
7+
"whitespace": false
78
}
89
}

0 commit comments

Comments
 (0)