Last active
May 20, 2016 05:50
-
-
Save cosemansp/0a6f19b24362f886469b423fdf68a1c1 to your computer and use it in GitHub Desktop.
Typescript for ES6 developers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default import from commonJS module | |
## ES6 | |
import chai, { expect } from 'chai'; | |
import chaiAsPromised from 'chai-as-promised'; | |
chai.use(chaiAsPromised); | |
## Typescript | |
import chai = require('chai'); | |
import chaiAsPromised = require('chai-as-promised'); | |
let expect = chai.expect; | |
chai.use(chaiAsPromised); | |
## TypesScript (alternative) | |
import * as chai from 'chai' | |
import { expect } from 'chai' | |
import * as chaiAsPromised from 'chai-as-promised' | |
chai.use(chaiAsPromised); | |
## To Look at !!??!! | |
--allowSyntheticDefaultImports |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment