From 5aee7112a17cd62b0eb9dd985fac99dc34df70cf Mon Sep 17 00:00:00 2001 From: kobenguyent <7845001+kobenguyent@users.noreply.github.com> Date: Wed, 25 Jun 2025 11:40:36 +0200 Subject: [PATCH 1/5] Update jsdoc.conf.js --- typings/jsdoc.conf.js | 1 + 1 file changed, 1 insertion(+) diff --git a/typings/jsdoc.conf.js b/typings/jsdoc.conf.js index 6b38e805f..377a7d8cb 100644 --- a/typings/jsdoc.conf.js +++ b/typings/jsdoc.conf.js @@ -28,6 +28,7 @@ module.exports = { './lib/mocha/bdd.js', './lib/mocha/hooks.js', './lib/within.js', + './lib/effects.js' require.resolve('@codeceptjs/detox-helper'), require.resolve('@codeceptjs/helper'), ], From b4761811f92df3e98ff5ec6a6ccef56427ba8fd1 Mon Sep 17 00:00:00 2001 From: kobenguyent <7845001+kobenguyent@users.noreply.github.com> Date: Wed, 25 Jun 2025 11:47:14 +0200 Subject: [PATCH 2/5] fix: jsdoc.conf.js --- typings/jsdoc.conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typings/jsdoc.conf.js b/typings/jsdoc.conf.js index 377a7d8cb..cd599a67d 100644 --- a/typings/jsdoc.conf.js +++ b/typings/jsdoc.conf.js @@ -28,7 +28,7 @@ module.exports = { './lib/mocha/bdd.js', './lib/mocha/hooks.js', './lib/within.js', - './lib/effects.js' + './lib/effects.js', require.resolve('@codeceptjs/detox-helper'), require.resolve('@codeceptjs/helper'), ], From fbfa8973f7d0d9290cadcfa35b742e9ad3ae5cfb Mon Sep 17 00:00:00 2001 From: kobenguyent <7845001+kobenguyent@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:26:34 +0200 Subject: [PATCH 3/5] Update jsdoc.conf.js --- typings/jsdoc.conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typings/jsdoc.conf.js b/typings/jsdoc.conf.js index cd599a67d..466b44834 100644 --- a/typings/jsdoc.conf.js +++ b/typings/jsdoc.conf.js @@ -9,6 +9,7 @@ module.exports = { './lib/container.js', './lib/data/table.js', './lib/data/dataTableArgument.js', + './lib/effects.js', './lib/event.js', './lib/index.js', './lib/locator.js', @@ -28,7 +29,6 @@ module.exports = { './lib/mocha/bdd.js', './lib/mocha/hooks.js', './lib/within.js', - './lib/effects.js', require.resolve('@codeceptjs/detox-helper'), require.resolve('@codeceptjs/helper'), ], From c95ad463b6a4a01914f4445426af92209ca44ef1 Mon Sep 17 00:00:00 2001 From: kobenguyent <7845001+kobenguyent@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:45:18 +0200 Subject: [PATCH 4/5] add types test --- typings/tests/global-variables.types.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/typings/tests/global-variables.types.ts b/typings/tests/global-variables.types.ts index aa21f2cca..fafa9a41b 100644 --- a/typings/tests/global-variables.types.ts +++ b/typings/tests/global-variables.types.ts @@ -83,3 +83,13 @@ expectType(AfterSuite((args) => { // @ts-ignore expectType(args.I) })) + +// @ts-ignore +expectType>(tryTo(() => { + return 123; +})); + +// @ts-ignore +expectType>(tryTo(async () => { + return 'async result'; +})); From 95f136dfb1cb210f5ee43d7ed7e338a9ca5c6471 Mon Sep 17 00:00:00 2001 From: kobenguyent <7845001+kobenguyent@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:51:21 +0200 Subject: [PATCH 5/5] Update global-variables.types.ts --- typings/tests/global-variables.types.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/typings/tests/global-variables.types.ts b/typings/tests/global-variables.types.ts index fafa9a41b..2d2a0a512 100644 --- a/typings/tests/global-variables.types.ts +++ b/typings/tests/global-variables.types.ts @@ -85,11 +85,11 @@ expectType(AfterSuite((args) => { })) // @ts-ignore -expectType>(tryTo(() => { - return 123; +expectType>(tryTo(() => { + return true; })); // @ts-ignore -expectType>(tryTo(async () => { - return 'async result'; +expectType>(tryTo(async () => { + return false; }));