@@ -15,6 +15,7 @@ export function createUserFromDiscriminatorValue(parseNode: ParseNode | undefine
1515}
1616/**
1717 * The deserialization information for the current model
18+ * @param User The instance to deserialize into.
1819 * @returns {Record<string, (node: ParseNode) => void> }
1920 */
2021// @ts -ignore
@@ -26,21 +27,18 @@ export function deserializeIntoUser(user: Partial<User> | undefined = {}) : Reco
2627}
2728/**
2829 * Serializes information the current object
30+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
31+ * @param User The instance to serialize from.
2932 * @param writer Serialization writer to use to serialize this model
3033 */
3134// @ts -ignore
32- export function serializeUser ( writer : SerializationWriter , user : Partial < User > | undefined | null = { } ) : void {
33- if ( user ) {
34- writer . writeStringValue ( "displayName" , user . displayName ) ;
35- writer . writeStringValue ( "id" , user . id ) ;
36- writer . writeAdditionalData ( user . additionalData ) ;
37- }
35+ export function serializeUser ( writer : SerializationWriter , user : Partial < User > | undefined | null = { } , isSerializingDerivedType : boolean = false ) : void {
36+ if ( ! user || isSerializingDerivedType ) { return ; }
37+ writer . writeStringValue ( "displayName" , user . displayName ) ;
38+ writer . writeStringValue ( "id" , user . id ) ;
39+ writer . writeAdditionalData ( user . additionalData ) ;
3840}
3941export interface User extends AdditionalDataHolder , Parsable {
40- /**
41- * Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
42- */
43- additionalData ?: Record < string , unknown > ;
4442 /**
4543 * The displayName property
4644 */
0 commit comments