Skip to content

Commit 51399ea

Browse files
committed
chore: use unknown instead any in typings
1 parent b350c7e commit 51399ea

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

typings/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ declare namespace Hermione {
257257
*/
258258
export interface History {
259259
n: string;
260-
a: any[];
260+
a: unknown[];
261261
ts: number;
262262
te: number;
263263
d: number;
@@ -309,7 +309,7 @@ declare namespace Hermione {
309309
(expectation: string, callback?: TestDefinitionCallback): Test;
310310
}
311311

312-
type TestDefinitionCallback = (this: TestDefinitionCallbackCtx, ctx: TestDefinitionCallbackCtx) => any;
312+
type TestDefinitionCallback = (this: TestDefinitionCallbackCtx, ctx: TestDefinitionCallbackCtx) => unknown;
313313

314314
export interface TestDefinitionCallbackCtx {
315315
browser: WebdriverIO.Browser;
@@ -352,7 +352,7 @@ declare namespace Hermione {
352352
workerFilepath: string,
353353
exportedMethods: ReadonlyArray<T>,
354354
) => {
355-
[K in (typeof exportedMethods)[number]]: (...args: Array<unknown>) => Promise<any> | any;
355+
[K in (typeof exportedMethods)[number]]: (...args: Array<unknown>) => Promise<unknown> | unknown;
356356
};
357357

358358
export interface Stats {
@@ -379,7 +379,7 @@ declare namespace Hermione {
379379
}
380380

381381
export interface GlobalHelper {
382-
ctx: { [name: string]: any };
382+
ctx: { [name: string]: unknown };
383383
skip: SkipBuilder;
384384
only: OnlyBuilder;
385385
browser: (browserName: string) => BrowserConfigurator;

typings/webdriverio/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ declare namespace WebdriverIO {
6262
* @param stepCb step callback
6363
* @returns {Promise<any>} value, returned by `stepCb`
6464
*/
65-
runStep(stepName: string, stepCb: () => Promise<any> | any): Promise<any>;
65+
runStep(stepName: string, stepCb: () => Promise<unknown> | unknown): Promise<unknown>;
6666
}
6767

6868
interface Element {

0 commit comments

Comments
 (0)