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

build: enforce type checks, fix type errors #338

Merged
merged 3 commits into from Apr 17, 2024
Merged

build: enforce type checks, fix type errors #338

merged 3 commits into from Apr 17, 2024

Conversation

justinmk
Copy link
Member

@justinmk justinmk commented Mar 20, 2024

Changes

  • enable "strict": true in tsconfig
  • fix errors

TODO

tsconfig ignores the test files...?

"exclude": ["node_modules", "__tests__", "**/*.test.ts", "examples", "lib"]

#352

@justinmk justinmk marked this pull request as ready for review April 17, 2024 12:28
@justinmk justinmk force-pushed the fixtypeerr branch 3 times, most recently from 27b37ce to 8092b95 Compare April 17, 2024 13:14
Also ignore node_modules/ at all levels.
ref #352

Before:

    src/api/Buffer.test.ts:102:9 - error TS2304: Cannot find name 'expect'.
    ...
    src/api/Buffer.test.ts:106:5 - error TS2593: Cannot find name 'it'.
    Do you need to install type definitions for a test runner? Try `npm
    i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and
    then add 'jest' or 'mocha' to the types field in your tsconfig.
    ...
    Found 616 errors in 8 files.

After:

    Found 138 errors in 6 files.
@justinmk justinmk merged commit f89d1c9 into master Apr 17, 2024
10 of 11 checks passed
@justinmk justinmk deleted the fixtypeerr branch April 17, 2024 13:22
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

Successfully merging this pull request may close these issues.

None yet

1 participant