Use currying to create reusable functions while keeping TypeScript types intact.
Badges
Badges come from GitHub once the author claims this feed.
Recent posts
every link opens the author’s post-
Curried Functions in TypeScript
-
Curried Functions in TypeScript
Use currying to create reusable functions while keeping TypeScript types intact.
-
Generics in TypeScript
Use generic type parameters to preserve relationships between inputs and outputs without giving up inference.
-
Generics in TypeScript
Use generic type parameters to preserve relationships between inputs and outputs without giving up inference.
-
Prevent Impossible States Pt. 3 - A UI Driven by State
Use the timer's state machine to drive a React UI, with controls that match its current status.
-
Getting Into Flow
Key takeaways from a conversation about flow states and how to make it easier to get into one.
-
Prevent Impossible States Pt. 2 - State Transitions
Model a timer's states and events with TypeScript unions, then define the rules for moving between them.
-
Life of a stargazer
featuring Colorfigures
-
Prevent Impossible States Pt. 1 - Union Types
Use TypeScript discriminated unions to require the right fields, narrow object types, and catch unhandled cases.