typia
Version:
Superfast runtime validators with only one line
15 lines (14 loc) • 674 B
TypeScript
/**
* Shared outer walk for the `camel`/`pascal` notations.
*
* Mirrors the `CamelCase<T>` / `PascalCase<T>` typings: leading underscores are
* preserved verbatim, an all-underscore key stays untouched, and the presence
* of any remaining underscore — not the number of non-empty segments — selects
* the `snake` conversion. Routing on underscore presence keeps a trailing or
* doubled underscore (`fooBar_`) on the same path the type takes, instead of
* collapsing it to the underscore-free `plain` path.
*/
export declare const __notationRename: (props: {
plain: (str: string) => string;
snake: (str: string) => string;
}) => (str: string) => string;