Skip to content

Commit 6467ed2

Browse files
committed
fix/1229: update x-cased-properties-y JSDocs.
1 parent d65a39d commit 6467ed2

8 files changed

+44
-0
lines changed

source/camel-cased-properties-deep.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ const preserveConsecutiveUppercase: CamelCasedPropertiesDeep<{fooBAR: {fooBARBiz
4848
}],
4949
},
5050
};
51+
52+
const splitOnPunctuation: CamelCasedPropertiesDeep<{'user@info': {'user::id': number; 'user::name': string}}, {splitOnPunctuation: true}> = {
53+
userInfo: {
54+
userId: 1,
55+
userName: 'Tom',
56+
},
57+
};
5158
```
5259
5360
@category Change case

source/camel-cased-properties.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ const result: CamelCasedProperties<User> = {
2626
const preserveConsecutiveUppercase: CamelCasedProperties<{fooBAR: string}, {preserveConsecutiveUppercase: true}> = {
2727
fooBAR: 'string',
2828
};
29+
30+
const splitOnPunctuation: CamelCasedProperties<{'foo::bar': string}, {splitOnPunctuation: true}> = {
31+
fooBar: 'string',
32+
};
2933
```
3034
3135
@category Change case

source/kebab-cased-properties-deep.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ const splitOnNumbers: KebabCasedPropertiesDeep<{line1: {line2: [{line3: string}]
5151
],
5252
},
5353
};
54+
55+
const splitOnPunctuation: KebabCasedPropertiesDeep<{'user@info': {'user::id': number; 'user::name': string}}, {splitOnPunctuation: true}> = {
56+
'user-info': {
57+
'user-id': 1,
58+
'user-name': 'Tom',
59+
},
60+
};
5461
```
5562
5663
@category Change case

source/kebab-cased-properties.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ const result: KebabCasedProperties<User> = {
2828
const splitOnNumbers: KebabCasedProperties<{line1: string}, {splitOnNumbers: true}> = {
2929
'line-1': 'string',
3030
};
31+
32+
const splitOnPunctuation: KebabCasedProperties<{'foo::bar': string}, {splitOnPunctuation: true}> = {
33+
'foo-bar': 'string',
34+
};
3135
```
3236
3337
@category Change case

source/pascal-cased-properties-deep.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ const preserveConsecutiveUppercase: PascalCasedPropertiesDeep<{fooBAR: {fooBARBi
4848
}],
4949
},
5050
};
51+
52+
const splitOnPunctuation: PascalCasedPropertiesDeep<{'user@info': {'user::id': number; 'user::name': string}}, {splitOnPunctuation: true}> = {
53+
UserInfo: {
54+
UserId: 1,
55+
UserName: 'Tom',
56+
},
57+
};
5158
```
5259
5360
@category Change case

source/pascal-cased-properties.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ const result: PascalCasedProperties<User> = {
2727
const preserveConsecutiveUppercase: PascalCasedProperties<{fooBAR: string}, {preserveConsecutiveUppercase: true}> = {
2828
FooBAR: 'string',
2929
};
30+
31+
const splitOnPunctuation: PascalCasedProperties<{'foo::bar': string}, {splitOnPunctuation: true}> = {
32+
FooBar: 'string',
33+
};
3034
```
3135
3236
@category Change case

source/snake-cased-properties-deep.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ const splitOnNumbers: SnakeCasedPropertiesDeep<{line1: {line2: [{line3: string}]
5151
],
5252
},
5353
};
54+
55+
const splitOnPunctuation: SnakeCasedPropertiesDeep<{'user@info': {'user::id': number; 'user::name': string}}, {splitOnPunctuation: true}> = {
56+
'user_info': {
57+
'user_id': 1,
58+
'user_name': 'Tom',
59+
},
60+
};
5461
```
5562
5663
@category Change case

source/snake-cased-properties.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ const result: SnakeCasedProperties<User> = {
2828
const splitOnNumbers: SnakeCasedProperties<{line1: string}, {splitOnNumbers: true}> = {
2929
'line_1': 'string',
3030
};
31+
32+
const splitOnPunctuation: SnakeCasedProperties<{'foo::bar': string}, {splitOnPunctuation: true}> = {
33+
'foo_bar': 'string',
34+
};
3135
```
3236
3337
@category Change case

0 commit comments

Comments
 (0)