import { CamelCase, IValidation, KebabCase, PascalCase, SnakeCase } from "@typia/interface"; import { TypeGuardError } from "./TypeGuardError"; /** * Converts property names to camelCase. * * Transforms all property names in the object (including nested) to camelCase * convention. Creates a new object with renamed properties. Distinct source * keys that become the same destination key are rejected with an error instead * of silently discarding a value. This collision policy also applies to the * assert, is, validate, and factory variants. * * Does not validate the input. For validation, use: * * - {@link assertCamel} — Throws on type mismatch * - {@link isCamel} — Returns `null` on type mismatch * - {@link validateCamel} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * * @returns New object with camelCase property names * * @throws {Error} When two source keys become the same destination key */ export declare function camel(input: T): CamelCase; /** * Converts property names to camelCase with assertion. * * Transforms all property names to camelCase with {@link assert} validation. * Throws {@link TypeGuardError} on type mismatch. * * Related functions: * * - {@link camel} — No validation * - {@link isCamel} — Returns `null` instead of throwing * - {@link validateCamel} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * @param errorFactory Custom error factory receiving * {@link TypeGuardError.IProps} * * @returns New object with camelCase property names * * @throws {TypeGuardError} When input doesn't conform to type `T` */ export declare function assertCamel(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): CamelCase; /** * Converts property names to camelCase with type checking. * * Transforms all property names to camelCase with {@link is} validation. Returns * `null` on type mismatch. * * Related functions: * * - {@link camel} — No validation * - {@link assertCamel} — Throws instead of returning `null` * - {@link validateCamel} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * * @returns New object with camelCase property names, or `null` if invalid */ export declare function isCamel(input: T): CamelCase | null; /** * Converts property names to camelCase with validation. * * Transforms all property names to camelCase with {@link validate} validation. * Returns {@link IValidation.IFailure} with all errors on mismatch, or * {@link IValidation.ISuccess} with converted object. * * Related functions: * * - {@link camel} — No validation * - {@link assertCamel} — Throws on first error * - {@link isCamel} — Returns `null` instead of error details * * @template T Type of input value * * @param input Object to convert * * @returns Validation result containing converted object or errors */ export declare function validateCamel(input: T): IValidation>; /** * Converts property names to PascalCase. * * Transforms all property names in the object (including nested) to PascalCase * convention. Creates a new object with renamed properties. Distinct source * keys that become the same destination key are rejected with an error instead * of silently discarding a value. This collision policy also applies to the * assert, is, validate, and factory variants. * * Does not validate the input. For validation, use: * * - {@link assertPascal} — Throws on type mismatch * - {@link isPascal} — Returns `null` on type mismatch * - {@link validatePascal} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * * @returns New object with PascalCase property names * * @throws {Error} When two source keys become the same destination key */ export declare function pascal(input: T): PascalCase; /** * Converts property names to PascalCase with assertion. * * Transforms all property names to PascalCase with {@link assert} validation. * Throws {@link TypeGuardError} on type mismatch. * * Related functions: * * - {@link pascal} — No validation * - {@link isPascal} — Returns `null` instead of throwing * - {@link validatePascal} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * @param errorFactory Custom error factory receiving * {@link TypeGuardError.IProps} * * @returns New object with PascalCase property names * * @throws {TypeGuardError} When input doesn't conform to type `T` */ export declare function assertPascal(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): PascalCase; /** * Converts property names to PascalCase with type checking. * * Transforms all property names to PascalCase with {@link is} validation. * Returns `null` on type mismatch. * * Related functions: * * - {@link pascal} — No validation * - {@link assertPascal} — Throws instead of returning `null` * - {@link validatePascal} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * * @returns New object with PascalCase property names, or `null` if invalid */ export declare function isPascal(input: T): PascalCase | null; /** * Converts property names to PascalCase with validation. * * Transforms all property names to PascalCase with {@link validate} validation. * Returns {@link IValidation.IFailure} with all errors on mismatch, or * {@link IValidation.ISuccess} with converted object. * * Related functions: * * - {@link pascal} — No validation * - {@link assertPascal} — Throws on first error * - {@link isPascal} — Returns `null` instead of error details * * @template T Type of input value * * @param input Object to convert * * @returns Validation result containing converted object or errors */ export declare function validatePascal(input: T): IValidation>; /** * Converts property names to snake_case. * * Transforms all property names in the object (including nested) to snake_case * convention. Creates a new object with renamed properties. Distinct source * keys that become the same destination key are rejected with an error instead * of silently discarding a value. This collision policy also applies to the * assert, is, validate, and factory variants. * * Does not validate the input. For validation, use: * * - {@link assertSnake} — Throws on type mismatch * - {@link isSnake} — Returns `null` on type mismatch * - {@link validateSnake} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * * @returns New object with snake_case property names * * @throws {Error} When two source keys become the same destination key */ export declare function snake(input: T): SnakeCase; /** * Converts property names to snake_case with assertion. * * Transforms all property names to snake_case with {@link assert} validation. * Throws {@link TypeGuardError} on type mismatch. * * Related functions: * * - {@link snake} — No validation * - {@link isSnake} — Returns `null` instead of throwing * - {@link validateSnake} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * @param errorFactory Custom error factory receiving * {@link TypeGuardError.IProps} * * @returns New object with snake_case property names * * @throws {TypeGuardError} When input doesn't conform to type `T` */ export declare function assertSnake(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): SnakeCase; /** * Converts property names to snake_case with type checking. * * Transforms all property names to snake_case with {@link is} validation. * Returns `null` on type mismatch. * * Related functions: * * - {@link snake} — No validation * - {@link assertSnake} — Throws instead of returning `null` * - {@link validateSnake} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * * @returns New object with snake_case property names, or `null` if invalid */ export declare function isSnake(input: T): SnakeCase | null; /** * Converts property names to snake_case with validation. * * Transforms all property names to snake_case with {@link validate} validation. * Returns {@link IValidation.IFailure} with all errors on mismatch, or * {@link IValidation.ISuccess} with converted object. * * Related functions: * * - {@link snake} — No validation * - {@link assertSnake} — Throws on first error * - {@link isSnake} — Returns `null` instead of error details * * @template T Type of input value * * @param input Object to convert * * @returns Validation result containing converted object or errors */ export declare function validateSnake(input: T): IValidation>; /** * Converts property names to kebab-case. * * Transforms all property names in the object (including nested) to kebab-case * convention. Creates a new object with renamed properties. Distinct source * keys that become the same destination key are rejected with an error instead * of silently discarding a value. This collision policy also applies to the * assert, is, validate, and factory variants. * * Does not validate the input. For validation, use: * * - {@link assertKebab} — Throws on type mismatch * - {@link isKebab} — Returns `null` on type mismatch * - {@link validateKebab} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * * @returns New object with kebab-case property names * * @throws {Error} When two source keys become the same destination key */ export declare function kebab(input: T): KebabCase; /** * Converts property names to kebab-case with assertion. * * Transforms all property names to kebab-case with {@link assert} validation. * Throws {@link TypeGuardError} on type mismatch. * * Related functions: * * - {@link kebab} — No validation * - {@link isKebab} — Returns `null` instead of throwing * - {@link validateKebab} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * @param errorFactory Custom error factory receiving * {@link TypeGuardError.IProps} * * @returns New object with kebab-case property names * * @throws {TypeGuardError} When input doesn't conform to type `T` */ export declare function assertKebab(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): KebabCase; /** * Converts property names to kebab-case with type checking. * * Transforms all property names to kebab-case with {@link is} validation. * Returns `null` on type mismatch. * * Related functions: * * - {@link kebab} — No validation * - {@link assertKebab} — Throws instead of returning `null` * - {@link validateKebab} — Returns detailed validation errors * * @template T Type of input value * * @param input Object to convert * * @returns New object with kebab-case property names, or `null` if invalid */ export declare function isKebab(input: T): KebabCase | null; /** * Converts property names to kebab-case with validation. * * Transforms all property names to kebab-case with {@link validate} validation. * Returns {@link IValidation.IFailure} with all errors on mismatch, or * {@link IValidation.ISuccess} with converted object. * * Related functions: * * - {@link kebab} — No validation * - {@link assertKebab} — Throws on first error * - {@link isKebab} — Returns `null` instead of error details * * @template T Type of input value * * @param input Object to convert * * @returns Validation result containing converted object or errors */ export declare function validateKebab(input: T): IValidation>; /** * Creates reusable {@link camel} function. * * @danger You must configure the generic argument `T` */ export declare function createCamel(): never; /** * Creates reusable {@link camel} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createCamel(): (input: T) => CamelCase; /** * Creates reusable {@link assertCamel} function. * * @danger You must configure the generic argument `T` */ export declare function createAssertCamel(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never; /** * Creates reusable {@link assertCamel} function. * * @template T Type of input value * * @param errorFactory Custom error factory receiving * {@link TypeGuardError.IProps} * * @returns Reusable conversion function */ export declare function createAssertCamel(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => CamelCase; /** * Creates reusable {@link isCamel} function. * * @danger You must configure the generic argument `T` */ export declare function createIsCamel(): never; /** * Creates reusable {@link isCamel} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createIsCamel(): (input: T) => CamelCase | null; /** * Creates reusable {@link validateCamel} function. * * @danger You must configure the generic argument `T` */ export declare function createValidateCamel(): never; /** * Creates reusable {@link validateCamel} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createValidateCamel(): (input: T) => IValidation>; /** * Creates reusable {@link pascal} function. * * @danger You must configure the generic argument `T` */ export declare function createPascal(): never; /** * Creates reusable {@link pascal} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createPascal(): (input: T) => PascalCase; /** * Creates reusable {@link assertPascal} function. * * @danger You must configure the generic argument `T` */ export declare function createAssertPascal(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never; /** * Creates reusable {@link assertPascal} function. * * @template T Type of input value * * @param errorFactory Custom error factory receiving * {@link TypeGuardError.IProps} * * @returns Reusable conversion function */ export declare function createAssertPascal(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => PascalCase; /** * Creates reusable {@link isPascal} function. * * @danger You must configure the generic argument `T` */ export declare function createIsPascal(): never; /** * Creates reusable {@link isPascal} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createIsPascal(): (input: T) => PascalCase | null; /** * Creates reusable {@link validatePascal} function. * * @danger You must configure the generic argument `T` */ export declare function createValidatePascal(): never; /** * Creates reusable {@link validatePascal} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createValidatePascal(): (input: T) => IValidation>; /** * Creates reusable {@link snake} function. * * @danger You must configure the generic argument `T` */ export declare function createSnake(): never; /** * Creates reusable {@link snake} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createSnake(): (input: T) => SnakeCase; /** * Creates reusable {@link assertSnake} function. * * @danger You must configure the generic argument `T` */ export declare function createAssertSnake(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never; /** * Creates reusable {@link assertSnake} function. * * @template T Type of input value * * @param errorFactory Custom error factory receiving * {@link TypeGuardError.IProps} * * @returns Reusable conversion function */ export declare function createAssertSnake(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => SnakeCase; /** * Creates reusable {@link isSnake} function. * * @danger You must configure the generic argument `T` */ export declare function createIsSnake(): never; /** * Creates reusable {@link isSnake} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createIsSnake(): (input: T) => SnakeCase | null; /** * Creates reusable {@link validateSnake} function. * * @danger You must configure the generic argument `T` */ export declare function createValidateSnake(): never; /** * Creates reusable {@link validateSnake} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createValidateSnake(): (input: T) => IValidation>; /** * Creates reusable {@link kebab} function. * * @danger You must configure the generic argument `T` */ export declare function createKebab(): never; /** * Creates reusable {@link kebab} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createKebab(): (input: T) => KebabCase; /** * Creates reusable {@link assertKebab} function. * * @danger You must configure the generic argument `T` */ export declare function createAssertKebab(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never; /** * Creates reusable {@link assertKebab} function. * * @template T Type of input value * * @param errorFactory Custom error factory receiving * {@link TypeGuardError.IProps} * * @returns Reusable conversion function */ export declare function createAssertKebab(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => KebabCase; /** * Creates reusable {@link isKebab} function. * * @danger You must configure the generic argument `T` */ export declare function createIsKebab(): never; /** * Creates reusable {@link isKebab} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createIsKebab(): (input: T) => KebabCase | null; /** * Creates reusable {@link validateKebab} function. * * @danger You must configure the generic argument `T` */ export declare function createValidateKebab(): never; /** * Creates reusable {@link validateKebab} function. * * @template T Type of input value * * @returns Reusable conversion function */ export declare function createValidateKebab(): (input: T) => IValidation>;