Skip to content

Instantly share code, notes, and snippets.

@pellejacobs
Created August 31, 2016 06:51
Show Gist options
  • Save pellejacobs/6b5dcf77c4b7713e5635564adcedd718 to your computer and use it in GitHub Desktop.
Save pellejacobs/6b5dcf77c4b7713e5635564adcedd718 to your computer and use it in GitHub Desktop.
"use strict";
var Promise = require('bluebird');
Promise.resolve("foo").then(function (msg) {
console.log(msg);
});
import Promise = require('bluebird')
Promise.resolve("foo").then(function (msg) {
console.log(msg)
})

Bash commands:

typings init
typings install -S bluebird
npm install -S bluebird
tsc 
node app.js
{
"name": "stackoverflow",
"version": "1.0.0",
"description": "",
"main": "app.js",
"author": "",
"license": "ISC",
"dependencies": {
"bluebird": "^3.4.5"
}
}
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"sourceMap": false
}
}
{
"name": "stackoverflow",
"dependencies": {
"bluebird": "registry:npm/bluebird#3.4.1+20160811213708"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment