Sha256: e08e58ac493a27b29ceee80da90bb31ec64341b520907d480df6244cdbec01f8

Contents?: true

Size: 635 Bytes

Versions: 52

Compression:

Stored size: 635 Bytes

Contents

import type {DelimiterCasedProperties} from './delimiter-cased-properties';

/**
Convert object properties to snake case but not recursively.

This can be useful when, for example, converting some API types from a different style.

@see SnakeCase
@see SnakeCasedPropertiesDeep

@example
```
import type {SnakeCasedProperties} from 'type-fest';

interface User {
	userId: number;
	userName: string;
}

const result: SnakeCasedProperties<User> = {
	user_id: 1,
	user_name: 'Tom',
};
```

@category Change case
@category Template literal
@category Object
*/
export type SnakeCasedProperties<Value> = DelimiterCasedProperties<Value, '_'>;

Version data entries

52 entries across 52 versions & 3 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.26 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.25 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
immosquare-cleaner-0.1.50 node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.24 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.23 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.22 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.21 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.20 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.19 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.18 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.17 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.16 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.15 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
immosquare-cleaner-0.1.49 node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.14 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
immosquare-cleaner-0.1.48 node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.13 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.12 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts
clapton-0.0.11 lib/clapton/javascripts/node_modules/type-fest/source/snake-cased-properties.d.ts