Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsc fails #375

Open
Hulkmaster opened this issue Jul 31, 2023 · 3 comments
Open

tsc fails #375

Hulkmaster opened this issue Jul 31, 2023 · 3 comments

Comments

@Hulkmaster
Copy link

Hulkmaster commented Jul 31, 2023

there are some issues from TS for generated files

src/generated/zeus/zeus/index.ts:655:3 - error TS6133: 'type' is declared but its value is never read.

655   type: T,
      ~~~~

src/generated/zeus/zeus/index.ts:656:3 - error TS6133: 'field' is declared but its value is never read.

656   field: Z,
      ~~~~~

src/generated/zeus/zeus/index.ts:710:58 - error TS6133: 'R' is declared but its value is never read.

710             [P in keyof DST]: SRC[P] extends '__union' & infer R ? never : P;
                                                             ~~~~~~~


Found 3 errors in the same file, starting at: src/generated/zeus/zeus/index.ts:655

current workaround: add manually // @ts-nocheck on top of the file

@aexol
Copy link
Collaborator

aexol commented Aug 16, 2023

Zeus stops working with every new version of TS

@aexol
Copy link
Collaborator

aexol commented Aug 16, 2023

I will try my best to fix

@Raphael0010
Copy link

Raphael0010 commented Aug 24, 2023

Hi, same here, did you find somethings better than // @ts-nocheck ?

Edit :
I have done this thing to automate it :

  "scripts": {
    "zeus": "zeus schema.gql ../../packages/ --typedDocumentNode && ts-node ../../packages/zeus/fixMe.ts"
  },

fixMe.ts

import * as fs from "fs";

const main = () => {
  const path = "../../packages/zeus/index.ts";
  const data = fs.readFileSync(path).toString().split("\n");
  data.splice(0, 0, "// @ts-nocheck");
  const text = data.join("\n");

  fs.writeFile(path, text, "utf-8", (err) => {
    if (err) {
      throw err;
    }
    console.log("Zeus Patched.");
  });
};

main();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants