Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): useRequestHeaders type should allow for undefined values #5748

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Jul 6, 2022

πŸ”— Linked issue

resolves nuxt/nuxt#14278

❓ Type of change

  • πŸ“– 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

This explicitly adds undefined as a possible value of the return type. This will only have effect if users are using TypeScript in strict mode, as is best practice.

πŸ“ Checklist

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

@danielroe danielroe added bug Something isn't working types 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels Jul 6, 2022
@danielroe danielroe requested a review from pi0 July 6, 2022 13:21
@danielroe danielroe self-assigned this Jul 6, 2022
@netlify
Copy link

netlify bot commented Jul 6, 2022

βœ… Deploy Preview for nuxt3-docs ready!

Name Link
πŸ”¨ Latest commit 0c8a329
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62c58c6338ff0e0008d5054b
😎 Deploy Preview https://deploy-preview-5748--nuxt3-docs.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@danielroe danielroe changed the title fix(nuxt): type for useRequestHeaders should allow for client-side … fix(nuxt): useRequestHeaders type should allow for undefined Jul 6, 2022
@pi0 pi0 changed the title fix(nuxt): useRequestHeaders type should allow for undefined fix(nuxt): useRequestHeaders type should allow for undefined values Jul 6, 2022
@pi0 pi0 merged commit 490d686 into main Jul 6, 2022
@pi0 pi0 deleted the fix/headers-type branch July 6, 2022 19:00
@pi0 pi0 mentioned this pull request Jul 11, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useRequestHeaders typing incorrect
2 participants