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

Type annotations #339

Merged
merged 44 commits into from
Dec 6, 2023
Merged

Conversation

toasted-nutbread
Copy link

This change adds JSDoc type annotations to everything and fixes any relevant code/bugs that arose due to incorrect type handling.

This is a massive change and I have not verified that everything 100% works as it should, but some cursory testing appears okay.

Copy link

github-actions bot commented Dec 3, 2023

✔️ No visual differences introduced by this PR.

View Playwright Report (note: open the "playwright-report" artifact)

.eslintrc.json Outdated Show resolved Hide resolved
.eslintrc.json Outdated Show resolved Hide resolved
@djahandarie
Copy link
Collaborator

Insanely impressive. Thank you so much. Once the CI failure is fixed, assuming the tests pass I think we can just merge it 👀

Copy link
Collaborator

@djahandarie djahandarie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!

@djahandarie djahandarie enabled auto-merge December 6, 2023 03:51
@djahandarie djahandarie added this pull request to the merge queue Dec 6, 2023
Merged via the queue into yomidevs:master with commit bd5bc1a Dec 6, 2023
5 checks passed
@djahandarie
Copy link
Collaborator

@toasted-nutbread I noticed that this PR doesn't add the test-ts check to CI.

I was going to put it into CI myself, but then I noticed that tsc is actually failing for me locally:

[nix-shell:~/yomitan]$ npx tsc --noEmit --project jsconfig.json
/home/darius/yomitan/node_modules/typescript/lib/tsc.js:116479
      throw e;
      ^

RangeError: Maximum call stack size exceeded
    at getTypeAtFlowNode (/home/darius/yomitan/node_modules/typescript/lib/tsc.js:65168:31)
    at getTypeAtFlowCondition (/home/darius/yomitan/node_modules/typescript/lib/tsc.js:65359:24)
    at getTypeAtFlowNode (/home/darius/yomitan/node_modules/typescript/lib/tsc.js:65203:18)
    at getTypeAtFlowBranchLabel (/home/darius/yomitan/node_modules/typescript/lib/tsc.js:65417:26)
    at getTypeAtFlowNode (/home/darius/yomitan/node_modules/typescript/lib/tsc.js:65211:48)
    at getTypeAtFlowCondition (/home/darius/yomitan/node_modules/typescript/lib/tsc.js:65359:24)
    at getTypeAtFlowNode (/home/darius/yomitan/node_modules/typescript/lib/tsc.js:65203:18)
    at getTypeAtFlowCondition (/home/darius/yomitan/node_modules/typescript/lib/tsc.js:65359:24)
    at getTypeAtFlowNode (/home/darius/yomitan/node_modules/typescript/lib/tsc.js:65203:18)
    at getTypeAtFlowBranchLabel (/home/darius/yomitan/node_modules/typescript/lib/tsc.js:65417:26)

Node.js v18.17.1

Does this happen in your environment?

@toasted-nutbread
Copy link
Author

Oh good point, I didn't realize that the CI wasn't just running npm test.

Regenerate your files in ext/lib, I made a change which adds a // @ts-nocheck header to them. I think that's where that issue was stemming from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/meta The issue or PR is meta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants