@azure-tools/typespec-ts 0.51.1 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -501,8 +501,8 @@ function buildModelTypeSerializer(
501
501
  output.push(`
502
502
  return ${serializeContent}
503
503
  `);
504
- } else if (options.flatten) {
505
- // Private flatten serializer: all child properties are read-only, so nothing to serialize.
504
+ } else {
505
+ // Nothing to serialize (all properties are read-only or metadata).
506
506
  // Rename the parameter to _item to avoid TypeScript unused-variable errors.
507
507
  const firstParam = serializerFunction.parameters?.[0];
508
508
  if (firstParam) {
@@ -511,10 +511,6 @@ function buildModelTypeSerializer(
511
511
  output.push(`
512
512
  return {};
513
513
  `);
514
- } else {
515
- output.push(`
516
- return item;
517
- `);
518
514
  }
519
515
  serializerFunction.statements = output;
520
516
  }