Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Remove typescript typings #1660

Merged
merged 2 commits into from
Aug 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,25 @@ web3.eth.getAccounts()
.then(console.log);
```

### Usage with TypeScript

Type definitions are maintained at [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) by others. You can install them with

```bash
npm install --dev @types/web3.js
```

You might need to install type definitions for `bignumber.js` and `lodash` too.

And then use `web3.js` as follows:

```typescript
import Web3 = require("web3"); // Note the special syntax! Copy this line when in doubt!
const web3 = new Web3("ws://localhost:8546");
```

**Please note:** We do not support TypeScript ourselves. If you have any issue with TypeScript and `web3.js` do not create an issue here. Go over to DefinitelyTyped and do it there.

## Documentation

Documentation can be found at [read the docs][docs]
Expand Down
27 changes: 0 additions & 27 deletions packages/web3/index.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/web3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3",
"license": "LGPL-3.0",
"main": "src/index.js",
"types": "index.d.ts",
"bugs": {
"url": "https://github.com/ethereum/web3.js/issues"
},
Expand Down Expand Up @@ -43,8 +42,6 @@
}
],
"dependencies": {
"@types/underscore": "^1.8.0",
"@types/bignumber.js": "^4.0.2",
"web3-bzz": "1.0.0-beta.35",
"web3-core": "1.0.0-beta.35",
"web3-eth": "1.0.0-beta.35",
Expand Down
Loading