Typescript definitions not generated correctly
See original GitHub issueWhat are you trying to achieve?
Generate typescript definitions
What do you get instead?
- Typescript definition file is not generated correctly. Please see the image bellow, where multiple functions definitions are not correct:
Sugestions:
- add tests to see that definitions are generated correctly
- having
.d.ts
files in your project directly are not the preffered way anymore, rather having a module@types/codeceptjs
- please add more types to functions, most of them use
any
Command used: codeceptjs def .
Details
- CodeceptJS version: 1.1.7
- NodeJS Version: 8.11.0
- Operating System: MacOS
- WebDriverIO
- Configuration file:
{
"bootstrap": "server.typescript.js",
"tests": "src/*/.test.ts",
"timeout": 10000,
"output": "./output",
"helpers": {
"WebDriverIO": {
"url": "http://localhost",
"browser": "chrome",
"restart": true
}
},
"include": {
"I": "./steps_file.js"
},
"mocha": {},
"name": "codecept"
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
TypeScript not generating declaration files - Stack Overflow
For whatever reason, I am not getting any .d.ts files. How can I produce definition files correctly? compile command. npx tsc. tsconfig.json.
Read more >Generating TypeScript Definition Files from JavaScript
Writing JavaScript while still being type-safe and automatically generating TypeScript Definition files for publishing.
Read more >Surviving the TypeScript Ecosystem — Part 4 - Medium
One thing to remember is that the type definition files in DefinitelyTyped are community sourced. In most cases they are not written by...
Read more >Typescript Typings: The Complete Guide: @types Compiler ...
Why does it look like Promise type definitions sometimes don't work correctly? Conclusions and Recommendations on to use Typescript type ...
Read more >Importing TypeScript Definitions - C#/XAML for HTML5 - cshtml5
To force re-generate the C# files from the TypeScript Definition, manually delete the file "TypeScriptDefInfos.xml" that is located in the "obj\Debug" sub- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Are there any plans to improve the
d.ts
generation? Eg:from
to
To me the current version is half baked. As typescript got more stable, also the community is increasing rapidly, most of the people starting to prefer it over flow or other similar solutions.
yeah, but still we don’t have much of internal types to be used. We generate types for
I
object which consists of methods taken from helpers.Anyway, the TS generator was broken in 1.1.7 but it should be fixed in 1.1.8.
So now by running
codeceptjs def
you get a list of commands with types: