This is going to be a set of examples of using typescript's type system in interesting ways. The goal is to be able to build a set of utility types that can be used to do computation compile time.
Some of these are already done by me or other people, I just need to copy them over. It's also possible that some of these aren't possible.
- JSON
Validation(See JSONValidation.ts)- Parsing
- Stringification
- Array Operations
Joining(See ArrayOperations.ts)- Mapping (This will be jank because you con't currently pass a generic type into a generic type)
- Filtering (This will be jank because you con't currently pass a generic type into a generic type)
Object Operations(See ObjectOperations.ts)KeysValuesEntries
- Numbers
- Addition
- Subtraction
- Multiplication
- Division
- Modulo
- Greater Than
- Less Than
Booleans(See BooleanOperations.ts)AndOrNotXor
- Strings (See StringOperations.ts)
SplittingReplacementContains- Substring
- Other
- Calculate primes
- Calculate fibonacci sequence
- Calculate factorial