Closed mattjohnsonpint closed 4 months ago
My guess is we need to modify https://github.com/JairusSW/as-json/blob/a563bfe790b5baf465fa08d6883a3d775daa497a/transform/src/index.ts#L235-L258 to also import JSON
for the generated code. But I couldn't quite make it work. Would be happy if you'd take a look. Thanks.
My temporary workaround:
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { JSON } from "json-as";
but it's ugly. 😅
Pausing my work on the develop
branch to work on this
Speaking of that the new version is coming along pretty well and is pretty dang performant
My temporary workaround:
// eslint-disable-next-line @typescript-eslint/no-unused-vars import { JSON } from "json-as";
but it's ugly. 😅
I think I made more ugly shitcode 🗿 Should probably go and think of a better way to design that transform. its bad
Yeah, CI tests failed with this merged too.
Create a file
message.ts
with the following:Create a file
index.ts
with the following:Compiling fails with the following:
If I add
import { JSON } from "json-as";
tomessage.ts
, it works, but I then have an unused import, which goes red in VS Code, creates a linting error in projects with eslint, etc.