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