Bash commands:
typings init
typings install -S bluebird
npm install -S bluebird
tsc
node app.js
"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" | |
} | |
} |