Sha256: 665c7850d78c30326b541d50c4dfad08cea616a7f58df6bb9c4872dd36778ad0
Contents?: true
Size: 833 Bytes
Versions: 28
Compression:
Stored size: 833 Bytes
Contents
import type {CamelCaseOptions} from './camel-case'; import type {PascalCase} from './pascal-case'; /** Convert object properties to pascal case but not recursively. This can be useful when, for example, converting some API types from a different style. @see PascalCase @see PascalCasedPropertiesDeep @example ``` import type {PascalCasedProperties} from 'type-fest'; interface User { userId: number; userName: string; } const result: PascalCasedProperties<User> = { UserId: 1, UserName: 'Tom', }; ``` @category Change case @category Template literal @category Object */ export type PascalCasedProperties<Value, Options extends CamelCaseOptions = {preserveConsecutiveUppercase: true}> = Value extends Function ? Value : Value extends Array<infer U> ? Value : {[K in keyof Value as PascalCase<K, Options>]: Value[K]};
Version data entries
28 entries across 28 versions & 2 rubygems