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

Don't automatically include all types from dependencies #3704

Merged
merged 3 commits into from
Apr 24, 2024

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Apr 23, 2024

This produces an error if you try to use something from a global scope accidentally. It's only needed for "ambient" definitions; if the thing is included directly (like for all of the Node libraries like fs) then its types come along with it automatically.

Also:

Issue: #3702


Requirements for PR author:

  • [n/a] All missing test coverage is tracked with "TODO" or .unimplemented().
  • [n/a] New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • [n/a] Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • [n/a] Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • [n/a] Tests are properly located in the test tree.
  • [n/a] Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
  • [n/a] Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Helpers and types promote readability and maintainability.

When landing this PR, be sure to make any necessary issue status updates.

@kainino0x kainino0x changed the title Remove dependency on @types/node Don't automatically include all types from dependencies Apr 24, 2024
This produces an error if you try to use something from a global scope
accidentally. It's only needed for "ambient" definitions; if the thing
is included directly (like for all of the Node libraries like `fs`) then
its types come along with it automatically.

Also:
- Replace `/// <reference />` usage because it does the same thing.
- Remove unused `@types/node` dependency (TypeScript has that built in).
@kainino0x kainino0x force-pushed the autoimport-fixes branch 2 times, most recently from f71fab6 to b5b4b4d Compare April 24, 2024 01:39
@kainino0x kainino0x requested a review from zoddicus April 24, 2024 01:42
@kainino0x kainino0x enabled auto-merge (squash) April 24, 2024 17:53
@kainino0x kainino0x merged commit 8bb1c0a into gpuweb:main Apr 24, 2024
1 check passed
@kainino0x kainino0x deleted the autoimport-fixes branch April 24, 2024 17:57
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.

2 participants