glideapps / quicktype

Generate types and converters from JSON, Schema, and GraphQL
https://app.quicktype.io
Apache License 2.0
11.93k stars 1.05k forks source link

incorrect type import syntax #2452

Open airtonix opened 8 months ago

airtonix commented 8 months ago

https://github.com/glideapps/quicktype/blob/f762a526d0e3cc041cbb277e7b0d02baed784bdf/packages/quicktype-core/src/input/JSONSchemaInput.ts#L45-L46

I'm on typescript 4.2.3 and this isn't valid syntax.

This is though:

import type { RunContext } from "../Run";
import type { Input } from "./Inputs";
inferrinizzard commented 7 months ago

The typescript version listed in the package.json is "4.9.5". Once you install that with npm, this should resolve the issue for you.

airtonix commented 7 months ago

we cant use that version sorry.

import type { RunContext } from "../Run";
import type { Input } from "./Inputs";

is still compatiable with later versions of type script.