Open douglasg14b opened 10 months ago
Enforcing casing, such as:
type MyObj = { name: IsKebabCase }
When I go to create an object of type MyObj the name property will error if not in kebab case.
MyObj
name
Utility types to enforce this would be golden
We can do this with built in Uppercase<T> and Lowercase<T> but it does not seem to work with DelimiterCase
Uppercase<T>
Lowercase<T>
DelimiterCase
Have you tried Capitalize<CamelCase<T>> for PascalCase or KebabCase<T> for kebab case?
Capitalize<CamelCase<T>>
KebabCase<T>
Enforcing casing, such as:
When I go to create an object of type
MyObj
thename
property will error if not in kebab case.Utility types to enforce this would be golden
We can do this with built in
Uppercase<T>
andLowercase<T>
but it does not seem to work withDelimiterCase
Upvote & Fund