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

🏷️ Prefer "import type" over raw "import" #4426

Merged
merged 4 commits into from
Nov 9, 2023

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Nov 9, 2023 β€’

While raw "import" works well, it does carry an extra cost:

  • bundlers may not optimize it as much as they can and may require to import the linked file even if they don't need to assess typings
  • it may produce less optimized bundles (we may refer to unneeded files and thus delay some operations)

Related to #4324

Category:

  • ✨ Introduce new features
  • πŸ“ Add or update documentation
  • βœ… Add or update tests
  • πŸ› Fix a bug
  • 🏷️ Add or update types
  • ⚑️ Improve performance
  • Other(s): ...

Potential impacts:

  • Generated values
  • Shrink values
  • Performance
  • Typings
  • Other(s): ...

Sorry, something went wrong.

While raw "import" works well, it does carry an extra cost:

- bundlers may not optimize it as much as they can and may require to import the linked file even if they don't need to assess typings
- it may produce less optimized bundles (we may refer to unneeded files and thus delay some operations)
Copy link

codesandbox-ci bot commented Nov 9, 2023 β€’

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5813db9:

Sandbox Source
Vanilla Configuration
@fast-check/examples Configuration

@dubzzz dubzzz enabled auto-merge (squash) November 9, 2023 08:52
Copy link

codecov bot commented Nov 9, 2023 β€’

Codecov Report

Merging #4426 (5813db9) into main (b3d5a46) will not change coverage.
Report is 8 commits behind head on main.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #4426   +/-   ##
=======================================
  Coverage   93.57%   93.57%           
=======================================
  Files         207      207           
  Lines        5013     5013           
  Branches     1368     1368           
=======================================
  Hits         4691     4691           
  Misses        322      322           
Flag Coverage Ξ”
unit-tests 93.57% <ΓΈ> (ΓΈ)
unit-tests-16.x-Linux 93.57% <ΓΈ> (ΓΈ)
unit-tests-18.x-Linux ?
unit-tests-latest-Linux 93.57% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Ξ”
...check/src/arbitrary/_internals/AdapterArbitrary.ts 100.00% <ΓΈ> (ΓΈ)
.../arbitrary/_internals/AlwaysShrinkableArbitrary.ts 100.00% <ΓΈ> (ΓΈ)
...t-check/src/arbitrary/_internals/ArrayArbitrary.ts 100.00% <ΓΈ> (ΓΈ)
...ck/src/arbitrary/_internals/ArrayInt64Arbitrary.ts 94.11% <ΓΈ> (ΓΈ)
...-check/src/arbitrary/_internals/BigIntArbitrary.ts 92.30% <ΓΈ> (ΓΈ)
...t-check/src/arbitrary/_internals/CloneArbitrary.ts 100.00% <ΓΈ> (ΓΈ)
...heck/src/arbitrary/_internals/CommandsArbitrary.ts 95.77% <ΓΈ> (ΓΈ)
...heck/src/arbitrary/_internals/ConstantArbitrary.ts 100.00% <ΓΈ> (ΓΈ)
...eck/src/arbitrary/_internals/FrequencyArbitrary.ts 98.01% <ΓΈ> (ΓΈ)
...eck/src/arbitrary/_internals/GeneratorArbitrary.ts 86.36% <ΓΈ> (ΓΈ)
... and 154 more

@dubzzz dubzzz merged commit 2a9cec5 into main Nov 9, 2023
@dubzzz dubzzz deleted the fast-check-faster-types branch November 9, 2023 11: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.

None yet

1 participant