frontend/.pnpm-store/v3/files/b1/9275e1e7979d296c9067fe5135917e3a4e86091ded40c3315da20a78f77e7401d84a247934b32bbfac9db670778a956d9ea145e0066b05cf58811407e396a7

27 lines
542 B
Plaintext

import {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
```
interface User {
userId: number;
userName: string;
}
const result: KebabCasedProperties<User> = {
'user-id': 1,
'user-name': 'Tom',
};
```
@category Template Literals
*/
export type KebabCasedProperties<Value> = DelimiterCasedProperties<Value, '-'>;