TypeScript Template Literal Types

TrimRight, TrimLeft and Trim types

Split and TupleToUnion types

SplitAsUnion type

Replace type

Replace and SplitAsUnion types together

This code example does exactly same job as previous code, the only difference is From generic parameter is splitted union type of S as shown in line 99, so that when you write From value, it will show and force you to use any of options.

ReplaceAll

Leave a Reply