Home > types > PascalCase
Converts a string literal to pascal-case.
Signature:
export declare type PascalCase<Value> = CamelCase<Value> extends string
? Capitalize<CamelCase<Value>>
: CamelCase<Value>;
References: CamelCase
``` import {PascalCase} from ‘type-fest’;
// Simple
const someVariable: PascalCase<‘foo-bar’> = ‘FooBar’;
// Advanced
type PascalCaseProps
interface RawOptions { ‘dry-run’: boolean; ‘full_family_name’: string; foo: number; }
const dbResult: CamelCasedProperties
Template Literals