Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 277 Bytes

4typealias.md

File metadata and controls

17 lines (11 loc) · 277 Bytes

Type Alias

Solution

No magic here, just use the Type Alias to signal the differences.

type EnumLike = String

Source

Pros

  • fast & simple

Cons

  • you can't separate behaviour in corresponding "types"