Skip to content

Commit 0284451

Browse files
committed
feat: Remove prepended ampersand and pipe
1 parent f6e425b commit 0284451

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
({{#each properties}} & {{>type}}{{/each}}){{>isNullable}}
1+
({{#each properties}}{{#unless @first}} & {{/unless}}{{>type}}{{/each}}){{>isNullable}}

src/templates/partials/typeUnion.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
({{#each properties}} | {{>type}}{{/each}}){{>isNullable}}
1+
({{#each properties}}{{#unless @first}} | {{/unless}}{{>type}}{{/each}}){{>isNullable}}

test/__snapshots__/index.spec.js.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2905,7 +2905,7 @@ import type { ModelWithString } from './ModelWithString';
29052905
/**
29062906
* This is a model that extends another model
29072907
*/
2908-
export type ModelThatExtends = ( & ModelWithString & {
2908+
export type ModelThatExtends = (ModelWithString & {
29092909
propExtendsA?: string,
29102910
propExtendsB?: ModelWithString,
29112911
});"
@@ -2922,7 +2922,7 @@ import type { ModelWithString } from './ModelWithString';
29222922
/**
29232923
* This is a model that extends another model
29242924
*/
2925-
export type ModelThatExtendsExtends = ( & ModelWithString & ModelThatExtends & {
2925+
export type ModelThatExtendsExtends = (ModelWithString & ModelThatExtends & {
29262926
propExtendsC?: string,
29272927
propExtendsD?: ModelWithString,
29282928
});"
@@ -2941,7 +2941,7 @@ import type { ModelWithEnum } from './ModelWithEnum';
29412941
* This is a model with one property with a 'all of' relationship
29422942
*/
29432943
export interface ModelWithAllOfAndNullable {
2944-
propA?: ( & {
2944+
propA?: ({
29452945
boolean?: boolean,
29462946
} & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;
29472947
}
@@ -2962,7 +2962,7 @@ import type { ModelWithString } from './ModelWithString';
29622962
* This is a model with one property with a 'any of' relationship
29632963
*/
29642964
export interface ModelWithAnyOf {
2965-
propA?: ( | ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary);
2965+
propA?: (ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary);
29662966
}
29672967
"
29682968
`;
@@ -2980,7 +2980,7 @@ import type { ModelWithEnum } from './ModelWithEnum';
29802980
* This is a model with one property with a 'any of' relationship
29812981
*/
29822982
export interface ModelWithAnyOfAndNullable {
2983-
propA?: ( | {
2983+
propA?: ({
29842984
boolean?: boolean,
29852985
} | ModelWithEnum | ModelWithArray | ModelWithDictionary) | null;
29862986
}
@@ -3245,7 +3245,7 @@ import type { ModelWithString } from './ModelWithString';
32453245
* This is a model with one property with a 'one of' relationship
32463246
*/
32473247
export interface ModelWithOneOf {
3248-
propA?: ( | ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary);
3248+
propA?: (ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary);
32493249
}
32503250
"
32513251
`;
@@ -3263,7 +3263,7 @@ import type { ModelWithEnum } from './ModelWithEnum';
32633263
* This is a model with one property with a 'one of' relationship
32643264
*/
32653265
export interface ModelWithOneOfAndNullable {
3266-
propA?: ( | {
3266+
propA?: ({
32673267
boolean?: boolean,
32683268
} | ModelWithEnum | ModelWithArray | ModelWithDictionary) | null;
32693269
}
@@ -4344,7 +4344,7 @@ export class ComplexService {
43444344
readonly type: 'Monkey' | 'Horse' | 'Bird',
43454345
listOfModels?: Array<ModelWithString> | null,
43464346
listOfStrings?: Array<string> | null,
4347-
parameters: ( | ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary),
4347+
parameters: (ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary),
43484348
readonly user?: {
43494349
readonly id?: number,
43504350
readonly name?: string | null,

0 commit comments

Comments
 (0)