Typetypesv0.14.1StringStartsWithFilters string union types to only include those that start with a specific string type StringStartsWith< BaseUnion extends string, StartingString extends string > = BaseUnion extends `${StartingString}${string}` ? BaseUnion : never;ExamplesCopytype Example = 'apple' | 'banana' | 'apricot' | 'cherry'; type Result = StartsWith<Example, 'ap'>; // Result: 'apple' | 'apricot'Type parametersBaseUnionThe union of strings to filter BaseUnion extends stringStartingStringThe string that valid members must start with StartingString extends string