Managing dependencies

    • One convention places all these dependent URLs into a local file. Functionality is then exported out of deps.ts for use by local modules.
    • Continuing this convention, dev only dependencies can be kept in a dev_deps.ts file.
    • See also Linking to external code
    1. import { add, multiply } from "./deps.ts";
    2. function totalCost(outbound: number, inbound: number, tax: number): number { return multiply(add(outbound, inbound), tax);}
    3. console.log(totalCost(19, 31, 1.2));console.log(totalCost(45, 27, 1.15));