TrimStart<A>Type-level representation of trimming whitespace from the start of a string.
Example (Trimming leading whitespace at the type level)
import type { String } from "effect"
type Result = String.TrimStart<" hello"> // "hello"models
Source effect/String.ts:3141 lines
export type type TrimStart<A extends string> =
A extends
| ` ${infer B}`
| `
${infer B}`
| `\t${infer B}`
| `\r${infer B}`
? TrimStart<B>
: A
Type-level representation of trimming whitespace from the start of a string.
Example (Trimming leading whitespace at the type level)
import type { String } from "effect"
type Result = String.TrimStart<" hello"> // "hello"
TrimStart<function (type parameter) A in type TrimStart<A extends string>A extends string> = function (type parameter) A in type TrimStart<A extends string>A extends `${" " | "\n" | "\t" | "\r"}${infer function (type parameter) BB}` ? type TrimStart<A extends string> =
A extends
| ` ${infer B}`
| `
${infer B}`
| `\t${infer B}`
| `\r${infer B}`
? TrimStart<B>
: A
Type-level representation of trimming whitespace from the start of a string.
Example (Trimming leading whitespace at the type level)
import type { String } from "effect"
type Result = String.TrimStart<" hello"> // "hello"
TrimStart<function (type parameter) BB> : function (type parameter) A in type TrimStart<A extends string>AReferenced by 2 symbols