1
0
mirror of synced 2025-11-08 04:48:04 +00:00
Files
typescript-starter/examples/node-vanilla/test.js
Jason Dreyzehner 45d7dfad62 docs(examples): refactor examples to be more familiar to most users
use npm to install the library and run each example, remove yarn.lock files
2017-02-17 02:30:16 -05:00

16 lines
545 B
JavaScript

// Node.js should resolve this to the root of the repo. Since the path returns a
// directory, node will look for the `main` property in `package.json`, which
// should point to the `main` build.
var starter = require('typescript-starter');
// now we can use the library
var assert = require('assert');
assert(starter.double(6) === 12);
console.log("✔ starter.double(6) === 12");
assert(starter.power(3,4) === 81);
console.log("✔ starter.power(3,4) === 81");
starter.asyncABC().then( abc => console.log("✔ asyncABC returned:", abc) );