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

[Bug]: TS Errors When Running With skipLibCheck: false #8937

Open
adrians5j opened this issue Jan 5, 2025 · 2 comments · May be fixed by #8939
Open

[Bug]: TS Errors When Running With skipLibCheck: false #8937

adrians5j opened this issue Jan 5, 2025 · 2 comments · May be fixed by #8939
Assignees
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@adrians5j
Copy link

adrians5j commented Jan 5, 2025

System Info

System:
OS: macOS 12.7.6
CPU: (10) arm64 Apple M1 Pro
Memory: 2.82 GB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 20.18.1 - /usr/local/bin/node
Yarn: 3.6.4 - /opt/homebrew/bin/yarn
npm: 10.2.5 - /opt/homebrew/bin/npm
Browsers:
Brave Browser: 131.1.73.101
Safari: 15.6.1

Details

We're building our project which has skipLibCheck:false in one of our build steps.

In that process, build fails with the following TS errors:

webiny error: ../../node_modules/@rspack/binding/binding.d.ts(172,7): error TS2380: The return type of a 'get' accessor must be assignable to its 'set' accessor type
  Type 'undefined' is not assignable to type 'string'.
../../node_modules/@rspack/core/dist/config/index.d.ts(5,1): error TS1383: Only named exports may use 'export type'.
../../node_modules/@rspack/core/dist/exports.d.ts(36,1): error TS1383: Only named exports may use 'export type'.

Dug into the code a bit, and for example, for the first TS2380 error, I can see it:
Image

Reproduce link

No response

Reproduce Steps

In our repo, we've run our build process with the skipLibCheck: false in our TS config. With this setting, we can see the above errors.

@adrians5j adrians5j added bug Something isn't working pending triage The issue/PR is currently untouched. labels Jan 5, 2025
@adrians5j adrians5j changed the title [Bug]: [Bug]: TS Errors When Running With skipLibCheck: false Jan 5, 2025
@shulaoda shulaoda self-assigned this Jan 6, 2025
@shulaoda shulaoda linked a pull request Jan 6, 2025 that will close this issue
2 tasks
@SoonIter
Copy link
Member

SoonIter commented Jan 6, 2025

I think #8939 will address this issue.
However, I'm more curious as to why ts-jest failed to catch this error during the testing process.

"^.+\\.(ts)?$": ["ts-jest", { tsconfig: "<rootDir>/tests/tsconfig.json" }]

@adrians5j
Copy link
Author

Thanks for looking into this @SoonIter! ❤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants