Error: Excessive stack depth comparing types 'ParseMixedSchema<?, T>' and 'ParseMixedSchema<?, T>'.ts(2321)
See original GitHub issueAs of version 1.6.5, I now get this error in several places in my code.
Excessive stack depth comparing types 'ParseMixedSchema<?, T>' and 'ParseMixedSchema<?, T>'.ts(2321)
It comes from this:
import type { FromSchema } from 'json-schema-to-ts';
import createHttpError, { NamedConstructors } from 'http-errors';
import { URLSearchParams } from 'url';
export type ValidatedAPIGatewayProxyEvent<S> = APIGatewayProxyEvent &
FromSchema<S>;
which I adopted from the Serverless Framework TS template.
I create a JS/JSON API Gateway schema, e.g.:
const schema = {
type: 'object',
properties: {
body: {
type: 'object',
properties: {
coupon_id: { type: 'string' },
end_of_term: { type: 'boolean' },
plan_id: { type: 'string' },
subscription_id: { type: 'string' },
reactivate: { type: 'boolean' },
first_payment: { type: 'boolean' },
},
required: ['end_of_term', 'plan_id', 'subscription_id'],
additionalProperties: false,
},
},
} as const;
and pass it to Sentry’s wrapHandler
:
export const handler = Sentry.AWSLambda.wrapHandler<
ValidatedAPIGatewayProxyEvent<S>,
APIGatewayProxyResult | undefined
>(...
This has worked fine up until the latest release.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Excessive stack depth comparing types 'Snapshot<T>' and ...
The error occurs because the return type of the child method in the firebase.database.DataSnapshot is that of its enclosing interface.
Read more >type-graphql/Lobby - Gitter
Hard to say, it doesn't look like a TypeGraphQL fault ... and this is blocked by the [at-loader] TS2321: Excessive stack depth comparing...
Read more >Developers - TS2321: Excessive stack depth comparing types ...
Steps to reproduce or a small repository showing the problem: I am trying to build an API with typeorm and type-graphql. The following...
Read more >Typescript rendering via map error: Excessive stack depth ...
Coding example for the question Typescript rendering via map error: Excessive stack depth comparing types-Reactjs.
Read more >[REQ] Python clientlib should have type annotations - OpenAPITools ...
The python ecosystem as a whole is moving towards type annotations being ... Error: Excessive stack depth comparing types 'ParseMixedSchema<?, T>' and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve been seein the same error in the latest version in https://github.com/feathersjs/feathers/tree/dove/packages/schema. The smallest example I could come up with to reproduce looks like this:
Maybe that helps, I can try and do some more digging if you think it’s worth investigating. Either way, this is a great project!
I think this can be closed. I haven’t seen this weirdo error in a while
Now I just need to find workarounds for “Type instantiation is excessively deep and possibly infinite” 😤