Import web3-typescript-typings to monorepo

This commit is contained in:
Leonid Logvinov
2018-01-04 19:08:20 +01:00
parent 2e67d69434
commit a3274ac9b1
6 changed files with 172 additions and 127 deletions

View File

@@ -1,25 +1,49 @@
Web3 Typescript Type Definition
-------------------------------
## web3-typescript-typings
There currently isn't an official [Web3][Web3]
type definition included in the [DefinitelyTyped][DefinitelyTyped] project.
There currently isn't an official [Web3][web3]
type definition included in the [DefinitelyTyped][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][DefinitelyTyped].
If it get's close to comprehensive, we'll add it to [DefinitelyTyped][definitelytyped].
[Web3]: https://github.com/ethereum/web3.js/
[DefinitelyTyped]: https://github.com/DefinitelyTyped/DefinitelyTyped
[web3]: https://github.com/ethereum/web3.js/
[definitelytyped]: https://github.com/DefinitelyTyped/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 the definitions within the `typeRoots` section of your `tsconfig.json`
## Installation
```bash
yarn add -D web3-typescript-typings
```
## Usage
Add the following lines to compilerOptions section of your `tsconfig.json`
```json
"typeRoots": ["node_modules/@types", "node_modules/web3-typescript-typings"]
```
And you're ready to go to a bright type-safe and distributed future!
## Contributing
We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
### Install Dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Lint
```bash
yarn lint
```