002: Intro to Opaque Types episode artwork

EPISODE · Apr 3, 2020 · 40 MIN

002: Intro to Opaque Types

from Elm Radio · host Dillon Kearns

Opaque TypesSome patternsRuntime validations - conditionally return type, wrapped in Result or MaybeGuarantee constraints through the exposed API of the module (like PositiveInteger or AuthToken examples)Package-Opaque ModulesExample - the Element type in elm-ui.Definition of the Element type aliaselm-ui's elm.json file does not expose the internal module where the real Element type is defined.Example from elm-graphql codebase - CamelCaseName opaque type

Opaque Types are a fancy way of saying "custom type with a private constructor." We talk about the basics, how to get started, and some patterns for using Opaque Types.

NOW PLAYING

002: Intro to Opaque Types

0:00 40:00

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

Frequently Asked Questions

How long is this episode of Elm Radio?

This episode is 40 minutes long.

When was this Elm Radio episode published?

This episode was published on April 3, 2020.

What is this episode about?

Opaque TypesSome patternsRuntime validations - conditionally return type, wrapped in Result or MaybeGuarantee constraints through the exposed API of the module (like PositiveInteger or AuthToken examples)Package-Opaque ModulesExample - the Element...

Can I download this Elm Radio episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!