astro-ghostcms/.pnpm-store/v3/files/f9/10d8e1a37e2f12ace57b097c0fd...

31 lines
639 B
Plaintext

import type {DelimiterCasedProperties} from './delimiter-cased-properties';
/**
Convert object properties to kebab case but not recursively.
This can be useful when, for example, converting some API types from a different style.
@see KebabCase
@see KebabCasedPropertiesDeep
@example
```
import type {KebabCasedProperties} from 'type-fest';
interface User {
userId: number;
userName: string;
}
const result: KebabCasedProperties<User> = {
'user-id': 1,
'user-name': 'Tom',
};
```
@category Change case
@category Template literal
@category Object
*/
export type KebabCasedProperties<Value> = DelimiterCasedProperties<Value, '-'>;