An open API service indexing awesome lists of open source software.

https://github.com/gregonnet/conditional-types-playground


https://github.com/gregonnet/conditional-types-playground

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

## Conditional types

### Code demo steps

- 0. get rid of any
- 1. add type information string
- 2. demonstrate that simple union type signature with null is not working well
- 3. use overload signatures for string and null
- 4. demonstrate that parameter with union type is not supported
- 5. Show solution wih conditional types
- 6. refactor conditional type (StringOrNull)