Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
### User Story
[comment]: # (As a , I want to so that .)
As a developer, I need the ability to use TypeScript definitions web3 so that I can write code meeting the requirements of this project.
### Why Is this Needed?
[comment]: # (Describe the problem and why this task is needed. Provide a description of the current state, what you would like to happen, and what actually happen)
We have a requirement to use TypeScript and we need type definitions included in this project.
[comment]: # (Feature or Bug? i.e Type: Bug)
### Current Behavior
[comment]: # (Describe what actually happened.)
No type definitions for email@example.com.
### Expected Behavior
[comment]: # (Describe what you expected to happen.)
Able to develop code using firstname.lastname@example.org type definitions.
[comment]: # (Provide a summary of the solution and a task list on what needs to be fixed.)
Currently, type definitions exist for the 0.x version of web3, https://www.npmjs.com/package/web3-typescript-typings. I believe this project is maintained by 0x. You can also find additional definitions here, https://github.com/0xProject/0x-monorepo/tree/development/packages/typescript-typings/types.
For the web3 1.x.x version, we have not been able to find type definitions. Here is an unanswered Stack Exchange issue, https://ethereum.stackexchange.com/questions/47055/how-to-use-web3-js1-0-0-beta34-with-typescript.
A solution might involve https://github.com/Microsoft/dts-gen but errors are generated when attempting to use this tool.
18:08 $ dts-gen -m web3
Unexpected crash! Please log a bug with the commandline you specified.
TypeError: Cannot read property 'prototype' of null
Ideally, this would be an automated solution since we anticipate ongoing changes to web3. Also, we would like to contribute to https://github.com/DefinitelyTyped/DefinitelyTyped once the type definitions are complete.
### Definition of Done
[comment]: # (Any other information that would be useful, bullets are helpful.)
- Create TypeScript type definitions for ^email@example.com
- If possible, automate the creation of the definitions. If not, include instructions, if applicable, on the manual creation and things to watch/consider.
- Contribute to project to https://github.com/DefinitelyTyped/DefinitelyTyped
- Develop/pass tests to ensure the type definitions work correctly
- Include sample code
### Additional Information
[comment]: # (Any other information that would be useful, content, screenshots, etc.)