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

Types: Make LinkProps return a proper type #396

Merged
merged 6 commits into from
Dec 18, 2023
Merged

Types: Make LinkProps return a proper type #396

merged 6 commits into from
Dec 18, 2023

Conversation

molefrog
Copy link
Owner

@molefrog molefrog commented Dec 17, 2023

  1. Re-export utility types for working with navigation options
  2. Cover HookNavigationOptions with type specs
  3. Refactor HookNavigationOptions and make it work with empty options and arbitrary options

Unfortunately, ComponentProps<typeof Link> will still not work, I don't have ideas how to fix this yet (it basically assumes that Hook generic parameter is BaseLocationHook and not BrowserLocationHook, see skipped test case). Do you have any suggestions? Exported type LinkProps does work though.

Copy link

codesandbox bot commented Dec 17, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

stackblitz bot commented Dec 17, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

github-actions bot commented Dec 17, 2023

size-limit report 📦

Path Size
packages/wouter/esm/index.js 2.07 KB (0%)
packages/wouter/esm/use-browser-location.js 658 B (0%)
packages/wouter/esm/memory-location.js 834 B (0%)
packages/wouter/esm/use-hash-location.js 737 B (0%)
packages/wouter-preact/esm/index.js 1.95 KB (0%)
packages/wouter-preact/esm/use-browser-location.js 552 B (0%)
packages/wouter-preact/esm/use-hash-location.js 607 B (0%)
packages/wouter-preact/esm/memory-location.js 702 B (0%)

Copy link

codecov bot commented Dec 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1f71cbf) 100.00% compared to head (2dec5df) 100.00%.

❗ Current head 2dec5df differs from pull request most recent head 6df6c81. Consider uploading reports for the commit 6df6c81 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##                v3      #396   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            1         1           
=========================================
  Hits             1         1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@molefrog molefrog merged commit a3c62bf into v3 Dec 18, 2023
2 checks passed
@molefrog molefrog deleted the chore/types branch December 18, 2023 10:29
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

2 participants