October 2017
Intermediate to advanced
280 pages
6h 50m
English
We can import the entire math module using the following syntax:
// ch4/modules/app2.ts import * as math from './math'; console.log(math.square(2)); // 4 console.log(math.log(math.E)); // 1 console.log(math.PI); // 3.141592653589793
The semantics behind this syntax is quite similar to CommonJS, although, in the browser, we have implicit asynchronous behavior.
Read now
Unlock full access