diff --git a/lib/core/engine/context.js b/lib/core/engine/context.js index 9fba6b3e3..0b86f68ad 100644 --- a/lib/core/engine/context.js +++ b/lib/core/engine/context.js @@ -30,13 +30,13 @@ export class Context { ) { /** * This is the yargs object you get from the cli. If you add --my.id you can get that using options.my.id. - * @type {Object} + * @type {Record} */ this.options = options; /** * Here the result from each run is stored. - * @type {Object} + * @type {Record} */ this.result = result; @@ -58,7 +58,8 @@ export class Context { this.storageManager = storageManager; /** - * @type {Object} + * Scratch space shared between commands within a single iteration. + * @type {Record} */ this.taskData = {}; @@ -68,13 +69,7 @@ export class Context { * @type {{webdriver: WebDriverClass, driver: WebDriverInstance}} */ this.selenium = { - /** - * @typedef {typeof import('selenium-webdriver')} WebDriverClass - */ webdriver, - /** - * @typedef {import('selenium-webdriver').WebDriver} WebDriverInstance - */ driver: instantiatedDriver }; } diff --git a/tsconfig.json b/tsconfig.json index f1777a406..981aab4c0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "lib/core/engine/commands.js" ], "compilerOptions": { + "target": "ES2020", "allowJs": true, "declaration": true, "emitDeclarationOnly": true, @@ -12,6 +13,5 @@ "declarationMap": true, "esModuleInterop": true, "skipLibCheck": true - }, - "target": "ES2020" -} \ No newline at end of file + } +} diff --git a/types/core/engine/context.d.ts b/types/core/engine/context.d.ts index a3dbd890d..140a7ab51 100644 --- a/types/core/engine/context.d.ts +++ b/types/core/engine/context.d.ts @@ -20,14 +20,14 @@ export class Context { constructor(options: any, result: any, log: any, storageManager: any, index: any, webdriver: any, instantiatedDriver: any); /** * This is the yargs object you get from the cli. If you add --my.id you can get that using options.my.id. - * @type {Object} + * @type {Record} */ - options: any; + options: Record; /** * Here the result from each run is stored. - * @type {Object} + * @type {Record} */ - result: any; + result: Record; /** * @type {Logger} */ @@ -43,17 +43,18 @@ export class Context { */ storageManager: import("../../support/storageManager.js").StorageManager; /** - * @type {Object} + * Scratch space shared between commands within a single iteration. + * @type {Record} */ - taskData: any; + taskData: Record; /** * Get raw Selenium functionality. * @see https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/index.html * @type {{webdriver: WebDriverClass, driver: WebDriverInstance}} */ selenium: { - webdriver: typeof import("selenium-webdriver"); - driver: import("selenium-webdriver").WebDriver; + webdriver: WebDriverClass; + driver: WebDriverInstance; }; } export type Logger = { diff --git a/types/core/engine/context.d.ts.map b/types/core/engine/context.d.ts.map index f6721073e..774393efc 100644 --- a/types/core/engine/context.d.ts.map +++ b/types/core/engine/context.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../lib/core/engine/context.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH;IACE,2HA0DC;IAjDC;;;OAGG;IACH,aAAsB;IAEtB;;;OAGG;IACH,YAAoB;IAEpB;;OAEG;IACH,KAFU,MAAM,CAEF;IAEd;;;OAGG;IACH,OAFU,MAAM,CAEE;IAElB;;;OAGG;IACH,gBAFU,OAAO,iCAAiC,EAAE,cAAc,CAE9B;IAEpC;;OAEG;IACH,cAAkB;IAElB;;;;OAIG;IACH,UAFU;QAAC,SAAS,sCAAiB;QAAC,MAAM,yCAAmB;KAAC,CAW/D;CAEJ;;;;;WA9Ea,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;;;aACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;;;UACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;;;UACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;;;WACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;;;cACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;6BAIvB,cAAc,oBAAoB,CAAC;gCACnC,OAAO,oBAAoB,EAAE,SAAS"} \ No newline at end of file +{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../lib/core/engine/context.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH;IACE,2HAqDC;IA5CC;;;OAGG;IACH,SAFU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAEP;IAEtB;;;OAGG;IACH,QAFU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAET;IAEpB;;OAEG;IACH,KAFU,MAAM,CAEF;IAEd;;;OAGG;IACH,OAFU,MAAM,CAEE;IAElB;;;OAGG;IACH,gBAFU,OAAO,iCAAiC,EAAE,cAAc,CAE9B;IAEpC;;;OAGG;IACH,UAFU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAEX;IAElB;;;;OAIG;IACH,UAFU;QAAC,SAAS,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,iBAAiB,CAAA;KAAC,CAK/D;CAEJ;;;;;WAzEa,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;;;aACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;;;UACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;;;UACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;;;WACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;;;cACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;;6BAIvB,cAAc,oBAAoB,CAAC;gCACnC,OAAO,oBAAoB,EAAE,SAAS"} \ No newline at end of file