Closed mrded closed 1 year ago
I'm trying to turn into types a very basic schema:
const responseSchema = { type: 'object', additionalProperties: false, properties: { success: { type: 'boolean' }, statusCode: { type: 'number' }, message: { type: 'string' } }, required: ['success', 'statusCode', 'message'] } as const; type Response = FromSchema<typeof responseSchema>;
Which resolves as any.
any
When I try to build it, it fails with TS2589: Type instantiation is excessively deep and possibly infinite. error.
TS2589: Type instantiation is excessively deep and possibly infinite.
FYI: rolling back to v2.8 fixes the issue.
@mrded Yes it's a known issue, will be working on this tomorrow. Closing this as it's a duplicate of https://github.com/ThomasAribart/json-schema-to-ts/issues/144
I'm trying to turn into types a very basic schema:
Which resolves as
any
.When I try to build it, it fails with
TS2589: Type instantiation is excessively deep and possibly infinite.
error.