ts-json-schema-generator icon indicating copy to clipboard operation
ts-json-schema-generator copied to clipboard

Omit type causes maximum call stack size exceeded in v2.4.0

Open abdalla-rko opened this issue 2 months ago • 2 comments

Regression in 2.4.0 where Omit type that is causing an issue is not properly omitted and maximum call stack size exceeded, which was working in 2.3.0.

Here is the set of interfaces that is causing the issue when generating the JSON schema.

type ArrayElement<A> = A extends readonly (infer E)[] ? E : A;

interface IItems<T = any> {
  items?: IItems<ArrayElement<T>>;
}

export interface IFormProps extends Omit<IItems, 'items'> {
}

abdalla-rko avatar Dec 10 '25 17:12 abdalla-rko

Thanks for the report. Do you know what change caused this? Can you work on a fix?

domoritz avatar Dec 10 '25 17:12 domoritz

lets see if copilot manages to fix this one 🤣

arthurfiorette avatar Dec 10 '25 21:12 arthurfiorette