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

Fixes typescript definition #1249

Merged
merged 1 commit into from
Jan 11, 2018
Merged

Fixes typescript definition #1249

merged 1 commit into from
Jan 11, 2018

Conversation

nicolaslawdune
Copy link
Contributor

Fixes web3 typescript definition #1248

@coveralls
Copy link

coveralls commented Dec 23, 2017

Coverage Status

Coverage remained the same at 85.709% when pulling 0d55228 on Synapsium:1.0 into 6816ce5 on ethereum:1.0.

@coveralls
Copy link

coveralls commented Dec 26, 2017

Coverage Status

Coverage remained the same at 85.709% when pulling 0d55228 on Synapsium:1.0 into 6816ce5 on ethereum:1.0.

@MaxBlaushild
Copy link

👍 🌮 🥇

@frozeman frozeman merged commit c0a4f0a into web3:1.0 Jan 11, 2018
@hodlbank
Copy link

It breaks
import Web3 from 'web3';
with
"module": "commonjs",
because:
TypeError: web3_1.default is not a constructor

@hodlbank
Copy link

$ node -v
v6.13.0
$ tsc -v
Version 2.6.2

{
  "compilerOptions": {
    "target": "esnext",
    "module": "commonjs"
  }
}

Minimal code to reproduce:

// .ts file
import Web3 from 'web3';

let web3 = new Web3(new Web3.providers.HttpProvider('http://localhost/'));

Transpiling result:

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const web3_1 = require("web3");
let web3 = new web3_1.default(new web3_1.default.providers.HttpProvider('http://localhost/'));

nachomazzara pushed a commit to nachomazzara/web3.js that referenced this pull request Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants