Here's a minimal TypeScript project using typings to manage 3rd party modules.
When editing the app.ts
file in Visual Studio Code I get all that nice code
completion. And tsc app.ts
will compile without complaints.
typings | |
app.js |
/// <reference path="typings/main.d.ts" /> | |
import * as os from "os"; | |
console.log(`Your tempdir is at: ${os.tmpdir()}`); |
{} |
{ | |
"version": false, | |
"ambientDependencies": { | |
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#513510a89acc648422c9abb047265116198f99ee" | |
} | |
} |