@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.
- package/CHANGELOG.md +7 -0
- package/dist/src/modular/buildClassicalClient.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalClient.js +1 -0
- package/dist/src/modular/buildClassicalClient.js.map +1 -1
- package/dist/src/modular/emitModels.d.ts.map +1 -1
- package/dist/src/modular/emitModels.js +28 -2
- package/dist/src/modular/emitModels.js.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.js +156 -78
- package/dist/src/modular/helpers/operationHelpers.js.map +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.js +2 -7
- package/dist/src/modular/serialization/buildSerializerFunction.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -21
- package/src/modular/buildClassicalClient.ts +1 -0
- package/src/modular/emitModels.ts +34 -2
- package/src/modular/helpers/operationHelpers.ts +182 -93
- package/src/modular/serialization/buildSerializerFunction.ts +2 -6
|
@@ -501,8 +501,8 @@ function buildModelTypeSerializer(
|
|
|
501
501
|
output.push(`
|
|
502
502
|
return ${serializeContent}
|
|
503
503
|
`);
|
|
504
|
-
} else
|
|
505
|
-
//
|
|
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
|
}
|