https://github.com/gregonnet/conditional-types-playground
https://github.com/gregonnet/conditional-types-playground
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gregonnet/conditional-types-playground
- Owner: GregOnNet
- Created: 2019-05-15T03:56:38.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T21:49:06.000Z (over 3 years ago)
- Last Synced: 2025-06-04T18:18:26.955Z (about 1 year ago)
- Language: TypeScript
- Size: 757 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
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)