Skip to content

Commit ab6ff2c

Browse files
Vadaskiclaude
andcommitted
style: fix Prettier formatting in schema.ts and schemaToJson.test.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 281a8d1 commit ab6ff2c

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

packages/core/src/util/schema.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,16 @@ export function schemaToJson(schema: AnySchema, options?: { io?: 'input' | 'outp
5050
const { id: _id, ...rest } = meta as Record<string, unknown>;
5151
return Object.keys(rest).length > 0 ? rest : undefined;
5252
},
53-
has(s: AnySchema) { return globalReg.has(s); },
53+
has(s: AnySchema) {
54+
return globalReg.has(s);
55+
},
5456
_idmap: new Map<string, AnySchema>(),
55-
_map: (globalReg as unknown as { _map: WeakMap<object, unknown> })._map,
57+
_map: (globalReg as unknown as { _map: WeakMap<object, unknown> })._map
5658
};
5759
return z.toJSONSchema(schema, {
5860
...options,
5961
reused: 'inline',
60-
metadata: idStrippedRegistry as unknown as z.core.$ZodRegistry<Record<string, unknown>>,
62+
metadata: idStrippedRegistry as unknown as z.core.$ZodRegistry<Record<string, unknown>>
6163
}) as Record<string, unknown>;
6264
}
6365

packages/core/test/util/schemaToJson.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ describe('schemaToJson', () => {
7171
// The id-stripping proxy must not drop these non-id metadata entries.
7272
const schema = z.object({
7373
name: z.string().describe('The user name'),
74-
age: z.number().int().describe('Age in years'),
74+
age: z.number().int().describe('Age in years')
7575
});
7676
const json = schemaToJson(schema);
7777

7878
expect(json.properties).toMatchObject({
7979
name: { type: 'string', description: 'The user name' },
80-
age: { type: 'integer', description: 'Age in years' },
80+
age: { type: 'integer', description: 'Age in years' }
8181
});
8282
});
8383
});

0 commit comments

Comments
 (0)