persona-community-5/.pnpm-store/v3/files/ae/e7fc3f9f5fb6874090e1465efdaa44bb78ba6c0959ed33525c59d8c4793b4796f18886c00f626f55b2e02523f573ca4f56b01c4f758fc17f85c916809880b4
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

43 lines
999 B
Plaintext

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<T> = {
[K in keyof T as PascalCase<K>]: T[K]
};
interface RawOptions {
'dry-run': boolean;
'full_family_name': string;
foo: number;
}
const dbResult: CamelCasedProperties<ModelProps> = {
DryRun: true,
FullFamilyName: 'bar.js',
Foo: 123
};
```
@category Change case
@category Template literal
*/
export type PascalCase<Value, Options extends CamelCaseOptions = {}> =
_PascalCase<Value, ApplyDefaultOptions<CamelCaseOptions, DefaultCamelCaseOptions, Options>>;
type _PascalCase<Value, Options extends Required<CamelCaseOptions>> = CamelCase<Value, Options> extends string
? Capitalize<CamelCase<Value, Options>>
: CamelCase<Value, Options>;