Hello,
I wanted to try out the new 4.0 version with Typescript, so I ran the npx codeceptjs init command on a fresh project and chose Typescript, and then ran npx codeceptjs def to generate the definition file.
This is the definition file I got :
/// <reference types='codeceptjs' />
type steps_file = typeof import('./tests/custom-steps');
declare namespace CodeceptJS {
interface SupportObject { I: I, current: any }
interface Methods extends Playwright {}
interface I extends ReturnType<steps_file> {}
namespace Translation {
interface Actions {}
}
}
I have two problems with it :
Thank you
Hello,
I wanted to try out the new 4.0 version with Typescript, so I ran the
npx codeceptjs initcommand on a fresh project and chose Typescript, and then rannpx codeceptjs defto generate the definition file.This is the definition file I got :
I have two problems with it :
Playwrightnamespace is nowhere to be found. I checked on a 3.x install and it was in atypes.d.tsfile in thetypingsdirectory, but that file is missing in 4.0.0steps_fileimport is wrong because it doesn't account for the fact that my step file is an ESM module. I found this issue CodeceptJS 4.x: Custom helper type definition created bycodeceptjs defdoesn't work (Property does not exist on type 'I') #5318 which had the same problem and was apparently fixed a while ago, so it seems strange to me.Thank you