Flags

  1. 1. What Is elm-ts-interop?
    2:57
  2. 2. Setup
    2:10
  3. 3. Flags
    2:52
  4. 4. FromElm Ports
    5:44
  5. 5. Encoding Custom Types
    9:54
  6. 6. Exhaustive Ports
    6:30
  7. 7. ToElm Ports
    11:10
  8. 8. Migrating to Pro
    9:32

Chapter Notes

Wire in the Flags#

  • elm-ts-json Decoder is a drop-in replacement for our original elm/json Flags Decoder
  • Run elm-ts-interop in watch mode npx elm-ts-interop --output src/Main.elm.d.ts --watch
  • Using InteropPorts.decodeFlags (the module from running elm-ts-interop init) ensures that our generated types and TypeScript types are in sync