@arrirpc/codegen-ts 0.57.8 → 0.58.1

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/dist/index.cjs CHANGED
@@ -227,7 +227,9 @@ function tsObjectFromSchema(schema, context) {
227
227
  if (prop.content)
228
228
  subContentParts.push(prop.content);
229
229
  const fieldName = validVarName(codegenUtils.camelCase(key));
230
- fieldParts.push(`${fieldName}: ${prop.typeName},`);
230
+ fieldParts.push(
231
+ `${getJsDocComment(subSchema.metadata)}${fieldName}: ${prop.typeName},`
232
+ );
231
233
  newParts.push(`${fieldName}: ${prop.defaultValue},`);
232
234
  const tempKey = `_${validVarName(key)}`;
233
235
  fromJsonParts.push(`let ${tempKey}: ${prop.typeName};`);
@@ -268,7 +270,9 @@ function tsObjectFromSchema(schema, context) {
268
270
  if (prop.content)
269
271
  subContentParts.push(prop.content);
270
272
  const fieldName = validVarName(codegenUtils.camelCase(key));
271
- fieldParts.push(`${fieldName}?: ${prop.typeName},`);
273
+ fieldParts.push(
274
+ `${getJsDocComment(subSchema.metadata)}${fieldName}?: ${prop.typeName},`
275
+ );
272
276
  const tempKey = `_${validVarName(key)}`;
273
277
  fromJsonParts.push(`let ${tempKey}: ${prop.typeName} | undefined;`);
274
278
  fromJsonParts.push(`if (typeof input.${key} !== 'undefined') {
package/dist/index.mjs CHANGED
@@ -221,7 +221,9 @@ function tsObjectFromSchema(schema, context) {
221
221
  if (prop.content)
222
222
  subContentParts.push(prop.content);
223
223
  const fieldName = validVarName(camelCase(key));
224
- fieldParts.push(`${fieldName}: ${prop.typeName},`);
224
+ fieldParts.push(
225
+ `${getJsDocComment(subSchema.metadata)}${fieldName}: ${prop.typeName},`
226
+ );
225
227
  newParts.push(`${fieldName}: ${prop.defaultValue},`);
226
228
  const tempKey = `_${validVarName(key)}`;
227
229
  fromJsonParts.push(`let ${tempKey}: ${prop.typeName};`);
@@ -262,7 +264,9 @@ function tsObjectFromSchema(schema, context) {
262
264
  if (prop.content)
263
265
  subContentParts.push(prop.content);
264
266
  const fieldName = validVarName(camelCase(key));
265
- fieldParts.push(`${fieldName}?: ${prop.typeName},`);
267
+ fieldParts.push(
268
+ `${getJsDocComment(subSchema.metadata)}${fieldName}?: ${prop.typeName},`
269
+ );
266
270
  const tempKey = `_${validVarName(key)}`;
267
271
  fromJsonParts.push(`let ${tempKey}: ${prop.typeName} | undefined;`);
268
272
  fromJsonParts.push(`if (typeof input.${key} !== 'undefined') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/codegen-ts",
3
- "version": "0.57.8",
3
+ "version": "0.58.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -23,10 +23,10 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "prettier": "^3.3.3",
26
- "@arrirpc/codegen-utils": "0.57.8",
27
- "@arrirpc/schema": "0.57.8"
26
+ "@arrirpc/codegen-utils": "0.58.1",
27
+ "@arrirpc/schema": "0.58.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@arrirpc/client": "0.57.8"
30
+ "@arrirpc/client": "0.58.1"
31
31
  }
32
32
  }