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

Using release >= 2.9.0 leads to Type instantiation is excessively deep and possibly infinite.deno-ts(2589)

Open tomas-zijdemans-vipps opened this issue 2 years ago • 2 comments

I'm using Deno and the sample code as shown below. However, if I upgrade to 2.9.0 or 2.9.1 I get: "Type instantiation is excessively deep and possibly infinite.deno-ts(2589)" on the last line (FromSchema)

import { FromSchema } from "https://deno.land/x/[email protected]/index.d.ts";

const objectSchema = {
  type: "object",
  properties: {
    foo: { type: "string" },
    bar: { type: "number" },
  },
  required: ["foo"],
} as const;

type Object = FromSchema<typeof objectSchema>;

tomas-zijdemans-vipps avatar Jun 23 '23 10:06 tomas-zijdemans-vipps

I am getting this in older versions too (v2.8.2)

lucgagan avatar Jun 27 '23 06:06 lucgagan

Also in node and 2.9.2

floratmin avatar Oct 22 '23 20:10 floratmin