import type {CamelCase, CamelCaseOptions, DefaultCamelCaseOptions} from './camel-case'; import type {ApplyDefaultOptions} from './internal'; /** Converts a string literal to pascal-case. @example ``` import type {PascalCase} from 'type-fest'; // Simple const someVariable: PascalCase<'foo-bar'> = 'FooBar'; // Advanced type PascalCaseProps = { [K in keyof T as PascalCase]: T[K] }; interface RawOptions { 'dry-run': boolean; 'full_family_name': string; foo: number; } const dbResult: CamelCasedProperties = { DryRun: true, FullFamilyName: 'bar.js', Foo: 123 }; ``` @category Change case @category Template literal */ export type PascalCase = _PascalCase>; type _PascalCase> = CamelCase extends string ? Capitalize> : CamelCase;