//#region src/_internal/types.d.ts /** * Recursively unwraps a (possibly deeply) nested array type to its innermost * element type — e.g. `ExtractNestedArrayType` is `number`. */ type ExtractNestedArrayType = T extends readonly (infer U)[] ? ExtractNestedArrayType : T; /** * Keeps the precise `Cased` literal type when `S` is a string literal, but * widens to `string` when `S` is the non-literal `string` — so case converters * return a plain `string` for dynamic inputs instead of leaking a partially * resolved type like `Lowercase`. */ type WidenNonLiteral = string extends S ? string : Cased; //#endregion export { ExtractNestedArrayType, WidenNonLiteral };