@@ -146,14 +146,14 @@ export function deserializeBarParser(barResponse: BarResponse | undefined = {}):
146
146
147
147
export function serializeTestObject ( writer : SerializationWriter , entity : { additionalData ?: Record < string , unknown > } | undefined | null = { } ) : void {
148
148
if ( ! entity ) {
149
- return ;
150
- }
151
- writer . writeAdditionalData ( entity . additionalData ) ;
149
+ return ;
150
+ }
151
+ writer . writeAdditionalData ( entity . additionalData ) ;
152
152
}
153
153
export function serializeTestParser ( writer : SerializationWriter , entity : TestParser | undefined | null = { } ) : void {
154
- if ( ! entity ) {
155
- return ;
156
- }
154
+ if ( ! entity ) {
155
+ return ;
156
+ }
157
157
writer . writeStringValue ( "id" , entity . id ) ;
158
158
writer . writeCollectionOfPrimitiveValues ( "testCollection" , entity . testCollection ) ;
159
159
writer . writeStringValue ( "testString" , entity . testString ) ;
@@ -177,26 +177,26 @@ export function serializeTestParser(writer: SerializationWriter, entity: TestPar
177
177
}
178
178
179
179
export function serializeFoo ( writer : SerializationWriter , entity : FooResponse | undefined | null = { } ) : void {
180
- if ( ! entity ) {
181
- return ;
182
- }
180
+ if ( ! entity ) {
181
+ return ;
182
+ }
183
183
writer . writeStringValue ( "id" , entity . id ) ;
184
184
writer . writeCollectionOfObjectValues ( "bars" , entity . bars , serializeBar ) ;
185
185
}
186
186
187
187
export function serializeBar ( writer : SerializationWriter , entity : BarResponse | undefined | null = { } ) : void {
188
- if ( ! entity ) {
189
- return ;
190
- }
188
+ if ( ! entity ) {
189
+ return ;
190
+ }
191
191
writer . writeStringValue ( "propA" , entity . propA ) ;
192
192
writer . writeStringValue ( "propB" , entity . propB ) ;
193
193
writer . writeDateValue ( "propC" , entity . propC ) ;
194
194
}
195
195
196
196
export function serializeTestBackModel ( writer : SerializationWriter , entity : TestBackedModel | undefined | null = { } ) : void {
197
- if ( ! entity ) {
198
- return ;
199
- }
197
+ if ( ! entity ) {
198
+ return ;
199
+ }
200
200
serializeTestParser ( writer , entity ) ;
201
201
}
202
202
@@ -214,9 +214,9 @@ export function deserializeIntoTestUnionObject(fooBar: Partial<TestUnionObject>
214
214
}
215
215
216
216
export function serializeTestUnionObject ( writer : SerializationWriter , fooBar : Partial < TestUnionObject > | undefined | null = { } ) : void {
217
- if ( ! fooBar ) {
218
- return ;
219
- }
217
+ if ( ! fooBar ) {
218
+ return ;
219
+ }
220
220
serializeFoo ( writer , fooBar as FooResponse ) ;
221
221
serializeBar ( writer , fooBar as BarResponse ) ;
222
222
}
0 commit comments