Function: createStatusIdentifier()
createStatusIdentifier<
T
>(statusText
:T
):CamelCase
<T
>
Defined in: src/utils/status.ts:95
Type-safe status identifier generator using CamelCase transformation.
Type Parametersโ
Tโ
T
extends string
Parametersโ
statusTextโ
T
Status text to convert to camelCase identifier
Returnsโ
CamelCase
<T
>
CamelCase identifier with proper type inference
Remarksโ
Uses type-fest's CamelCase utility to generate type-safe identifiers from status strings. This demonstrates the practical usage of type-fest string transformation utilities for API design and identifier generation.
Exampleโ
const statusId = createStatusIdentifier("service down");
// Result: "serviceDown" with type CamelCase<"service down">
const compositeId = createStatusIdentifier("monitor status check");
// Result: "monitorStatusCheck" with proper type inference