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

fix: correct type inference for routes #518

Merged
merged 6 commits into from
Oct 25, 2022
Merged

fix: correct type inference for routes #518

merged 6 commits into from
Oct 25, 2022

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Sep 19, 2022

πŸ”— Linked issue

resolves nuxt/nuxt#14850, nuxt/nuxt#15116

❓ Type of change

  • 🧹 Chore
  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

toMatchTypeOf can be misleading - this updates test for greater strictness. There are a few issues that appear in consequence; I'm marking PR as draft until we can fix them.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added the bug Something isn't working label Sep 19, 2022
@danielroe danielroe self-assigned this Sep 19, 2022
@pi0 pi0 changed the title fix(types): correct type inference for routes test: correct type inference for routes Sep 19, 2022
test/fixture/types.ts Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 16, 2022

Codecov Report

Merging #518 (bc6ee25) into main (51dbe84) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     nuxt/framework#518      +/-   ##
==========================================
+ Coverage   66.21%   66.25%   +0.04%     
==========================================
  Files          56       56              
  Lines        4129     4134       +5     
  Branches      445      446       +1     
==========================================
+ Hits         2734     2739       +5     
  Misses       1391     1391              
  Partials        4        4              
Impacted Files Coverage Ξ”
src/types/utils.ts 100.00% <100.00%> (ΓΈ)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@danielroe danielroe changed the title test: correct type inference for routes fix: correct type inference for routes Oct 16, 2022
@pi0
Copy link
Member

pi0 commented Oct 25, 2022

@danielroe Can you please fix merge conflict?

@pi0 pi0 merged commit 5a75f37 into main Oct 25, 2022
@pi0 pi0 deleted the test/strict-type-test branch October 25, 2022 10:44
WinterYukky pushed a commit to WinterYukky/nitro that referenced this pull request Nov 1, 2022
Co-authored-by: David Tai <didavid61202@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API route types not correctly inferred when using query params in $fetch
3 participants