ScalaJS and Typescript: an unlikely romance
summary
Claims that generating TypeScript declaration files from Scala.js source and emulating nominal types with phantom nominal tags removes DTS misrepresentations and the structural/nominal mismatch. Implements an sbt plugin proof‑of‑concept that emits interfaces, class constructors, unions, and newtypes for consumption by TypeScript; uses shapeless and generated tag fields to force nominal checks. Works on a real client/server project but currently yields read‑only APIs, lacks generic constraints and full variance, and needs a two‑pass or compiler‑integration future.
AI-written summary · about
chapters (6)
- 0:00Start
- 1:15Features of Typescript
- 3:03Conditional Types
- 3:39Conditional Types
- 5:12Map Types
- 17:21We Emulate Nominal Types in Our Dts Definitions
related talks
54mTypescript for the busy Java developer
20mTypeScript and ES6
38mUnderstanding TypeScript's Structural Type System
33mTypeScript - JavaScript you are gonna love
56mScala.js: Safety and Sanity in the Wild West of Web development
41mReconstructing Scala
40mTypeScript: State of the Union
24mTypeScript and how I've learned to love the compiler
