Shipping TypeScript to npm

Shipping TypeScript to npm

How we shipped @azure/cosmos in a way that everyone can happily consume it from npm. Presented at TypeScript NYC meetup on Feb 26th 2019

Steve Faulkner

February 26, 2019

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

65 slides
  1. Read/Write JSON Massive scale+perf No schema SQL API Everything indexed

    by default! Tune-able consistency JavaScript stored procedures
  2. lib

  3. // In tests! import { Agent } from “http” let

    opts : ClientOptions = { agent: new Agent() }
  4. export const Color = { Red: "Red" as “Red", Green:

    "Green" as "Green" }; const green: Color = Color.Green const red: Color = “Red”
  5. typescript(esm) -> esm rollup(esm) -> umd apiExtractor(index.d.ts) Don’t use “lib”

    esModuleInterop: true Mirror @types interfaces Don’t use enums Have a TS consumer tests

More Decks by Steve Faulkner

Other Decks in Programming