Sha256: 6b1071c06abcbe1c9f60638d570fdbfe944b6768f95d9f28ebc06c7eec9b4087
Contents?: true
Size: 777 Bytes
Versions: 33
Compression:
Stored size: 777 Bytes
Contents
import type {DelimiterCase} from './delimiter-case'; /** Convert object properties to delimiter case but not recursively. This can be useful when, for example, converting some API types from a different style. @see DelimiterCase @see DelimiterCasedPropertiesDeep @example ``` import type {DelimiterCasedProperties} from 'type-fest'; interface User { userId: number; userName: string; } const result: DelimiterCasedProperties<User, '-'> = { 'user-id': 1, 'user-name': 'Tom', }; ``` @category Change case @category Template literal @category Object */ export type DelimiterCasedProperties< Value, Delimiter extends string, > = Value extends Function ? Value : Value extends Array<infer U> ? Value : {[K in keyof Value as DelimiterCase<K, Delimiter>]: Value[K]};
Version data entries
33 entries across 33 versions & 1 rubygems