protocol/packages/web3-typescript-typings
Olaf Tomalka 9889c8f9e0
Fix ContractInstance new() not parsing properly
new is a keyword in typescript and so if a function is called new(),
tsc and for example Visual Studio Code don't regonize types for this
function. The fix is to write this function in quotes
2018-01-10 11:24:37 +01:00
..
2018-01-10 11:24:32 +01:00
2018-01-10 11:24:32 +01:00
2018-01-10 11:24:37 +01:00
2018-01-10 11:24:33 +01:00
2018-01-10 11:24:35 +01:00

Web3 Typescript Type Definition

There currently isn't an official Web3 type definition included in the DefinitelyTyped project. Until that happens, we will continue to improve our own type definition. If it get's close to comprehensive, we'll add it to DefinitelyTyped.

Installation

Using npm:

npm install --save-dev web3-typescript-typings

Using yarn:

yarn add web3-typescript-typings -D

Also don't forget to manually include index.d.ts within an include section of your tsconfig.json

"include": [
    ...
    "./node_modules/web3-typescript-typings/index.d.ts"
]

And you're ready to go to a bright type-safe and distributed future!