Skip to content

Commit a331546

Browse files
committed
feat: Remove prepended ampersand and pipe
1 parent a63db37 commit a331546

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
@@ -2989,7 +2989,7 @@ import type { ModelWithString } from './ModelWithString';
29892989
/**
29902990
* This is a model that extends another model
29912991
*/
2992-
export type ModelThatExtends = ( & ModelWithString & {
2992+
export type ModelThatExtends = (ModelWithString & {
29932993
propExtendsA?: string,
29942994
propExtendsB?: ModelWithString,
29952995
});"
@@ -3006,7 +3006,7 @@ import type { ModelWithString } from './ModelWithString';
30063006
/**
30073007
* This is a model that extends another model
30083008
*/
3009-
export type ModelThatExtendsExtends = ( & ModelWithString & ModelThatExtends & {
3009+
export type ModelThatExtendsExtends = (ModelWithString & ModelThatExtends & {
30103010
propExtendsC?: string,
30113011
propExtendsD?: ModelWithString,
30123012
});"
@@ -3025,7 +3025,7 @@ import type { ModelWithEnum } from './ModelWithEnum';
30253025
* This is a model with one property with a 'all of' relationship
30263026
*/
30273027
export interface ModelWithAllOfAndNullable {
3028-
propA?: ( & {
3028+
propA?: ({
30293029
boolean?: boolean,
30303030
} & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null;
30313031
}
@@ -3046,7 +3046,7 @@ import type { ModelWithString } from './ModelWithString';
30463046
* This is a model with one property with a 'any of' relationship
30473047
*/
30483048
export interface ModelWithAnyOf {
3049-
propA?: ( | ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary);
3049+
propA?: (ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary);
30503050
}
30513051
"
30523052
`;
@@ -3064,7 +3064,7 @@ import type { ModelWithEnum } from './ModelWithEnum';
30643064
* This is a model with one property with a 'any of' relationship
30653065
*/
30663066
export interface ModelWithAnyOfAndNullable {
3067-
propA?: ( | {
3067+
propA?: ({
30683068
boolean?: boolean,
30693069
} | ModelWithEnum | ModelWithArray | ModelWithDictionary) | null;
30703070
}
@@ -3329,7 +3329,7 @@ import type { ModelWithString } from './ModelWithString';
33293329
* This is a model with one property with a 'one of' relationship
33303330
*/
33313331
export interface ModelWithOneOf {
3332-
propA?: ( | ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary);
3332+
propA?: (ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary);
33333333
}
33343334
"
33353335
`;
@@ -3347,7 +3347,7 @@ import type { ModelWithEnum } from './ModelWithEnum';
33473347
* This is a model with one property with a 'one of' relationship
33483348
*/
33493349
export interface ModelWithOneOfAndNullable {
3350-
propA?: ( | {
3350+
propA?: ({
33513351
boolean?: boolean,
33523352
} | ModelWithEnum | ModelWithArray | ModelWithDictionary) | null;
33533353
}
@@ -4438,7 +4438,7 @@ export class ComplexService {
44384438
readonly type: 'Monkey' | 'Horse' | 'Bird',
44394439
listOfModels?: Array<ModelWithString> | null,
44404440
listOfStrings?: Array<string> | null,
4441-
parameters: ( | ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary),
4441+
parameters: (ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary),
44424442
readonly user?: {
44434443
readonly id?: number,
44444444
readonly name?: string | null,

0 commit comments

Comments
 (0)