How to setup Typescript when "steps_file.js" is used?

ngraf created this issue on 2021-02-01 · The issue is replied 1 times

I can't manage to get Typscript autocompletion when using a steps_file.js .
Can you please document in this repository how to achieve this?


What i did

Created structure of steps_file.js:

module.exports = function() { 
    return actor({

        // Define custom steps here, use 'this' to access default methods of I.
        // It is recommended to place a general 'login' function here.

        customStep1() {},
        customStep2() {}
    });
};

Load steps_file.js into my project:

    include: {
        I: './src/steps/steps_file.js',
    },

Run npx codeceptjs def

Result: My autocomplete feature for I does not work at all. I am using Webstorm from IntelliJ. When not using a steps_file.js , autocomplete works perfectly.

ngraf wrote this answer on 2021-02-01

Oh, I found the reason for failing autocomplete: I had a local backup copy of "codeceptjs" code repository. The IDE got confused that there is another "codeceptjs" folder other than the one in "node_modules".
After deleting ignoring/deleting the unneccessary "codeceptjs" folder, autocompletion started to work like a charm.

Issue closed (Cannot reproduce)

More Details About Repo
Owner Name codeceptjs
Repo Name typescript-boilerplate
Full Name codeceptjs/typescript-boilerplate
Language TypeScript
Created Date 2020-05-05
Updated Date 2021-10-30
Star Count 12
Watcher Count 4
Fork Count 6
Issue Count 1

YOU MAY BE INTERESTED

Issue Title State Comments Created Date Updated Date Closed Date
7News Sydney bulletin gets a "DRM protected" error open 12 2021-09-19 2021-11-17 -
reader read errror with leading double quote closed 1 2021-04-01 2021-11-15 2021-04-01
可以更新一下版本吗,这两年没更新了,钉钉的服务端接口都变了 closed 18 2019-05-07 2021-11-26 2021-07-09
这javascript如何远程更新? closed 1 2021-01-13 2021-11-21 2021-02-22
Is the example lost? closed 3 2021-09-23 2021-11-18 2021-09-26
Update functional tests including Jenkins setup open 0 2021-09-02 2021-11-07 -
Using wget will directly download without specify ak sk closed 6 2021-08-11 2021-11-17 2021-08-16
Allow multiple AccountsClient from same server and have namespaced localStorage open 3 2019-12-20 2021-11-17 -
[Question] How to reason about resolution failed error log? closed 7 2021-07-27 2021-11-25 2021-08-02
Clarify behavior of event::wait regarding asynchronicity in interop host_tasks closed 0 2021-04-28 2021-11-21 2021-07-22