WIP snake_case 1/?

through `contact_notification`
This commit is contained in:
Nate Butler
2023-06-28 22:42:57 -04:00
parent 2e162f8af7
commit b015f506da
41 changed files with 302 additions and 386 deletions
+2 -2
View File
@@ -5,8 +5,8 @@ import { snakeCase } from "case-anything"
// Typescript magic to convert any string from camelCase to snake_case at compile time
type SnakeCase<S> = S extends string
? S extends `${infer T}${infer U}`
? `${T extends Capitalize<T> ? "_" : ""}${Lowercase<T>}${SnakeCase<U>}`
: S
? `${T extends Capitalize<T> ? "_" : ""}${Lowercase<T>}${SnakeCase<U>}`
: S
: S
type SnakeCased<Type> = {