Closed mirao closed 3 years ago
@thiagodp The conflicts seem to be caused by changes in https://github.com/thiagodp/codeceptjs-dbhelper/commit/f369296ec802dfd21b9849000a2c61134f07eb6a ?
If needed I can patch index.js
and regenerate TS definition (index.d.ts
) again, from latest master
.
Hello @mirao! Yesterday, after accepting your contribution to codeceptjs-cmdhelper
, I included an index.d.ts
file to this project.
I just fixed the optional parameters in JSDoc (to include a brackets), and maybe this PR is not needed anymore.
Anyway, thank you for the contributions.
just fixed the optional parameters in JSDoc (to include a brackets), and maybe this PR is not needed anymore.
The latest version 1.2.1 works well, thanks for new release, it works as expected for me.
Only note that now index.ts
has set driver
instead of [driver]
in JSDoc, so if you regenerate TS definition (npx -p typescript ...
) in future, index.d.ts
will get driver
instead of driver?
and therefore this TS check will fail:
:
@mirao index.js
' JSDoc is now fixed (v1.2.2) and index.d.ts
is being generated from it using tsc
. Thx again.
Motivation: I started to migrate my JS tests to TS format and want to be able to have functional IntelliSense in VSCode and TS check in TS tests:
Param
driver
in JSDoc was set as optional (https://jsdoc.app/tags-param.html#optional-parameters-and-default-values) so that generated TS definition allows omit it (otherwise TS check fails when callingI.connect
without that)TS definition was created by
npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly
, see https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html