Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

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

Merged
pi0 merged 1 commit into
mainfrom
fix/headers-type
Jul 6, 2022
Merged

fix(nuxt): useRequestHeaders type should allow for undefined values#5748
pi0 merged 1 commit into
mainfrom
fix/headers-type

Conversation

@danielroe

@danielroedanielroe commented Jul 6, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/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.

@danielroedanielroe 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 pi0July 6, 2022 13:21
@danielroedanielroe self-assigned this Jul 6, 2022
@netlify

netlifyBot commented Jul 6, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs ready!

NameLink
🔨 Latest commit0c8a329
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62c58c6338ff0e0008d5054b
😎 Deploy Previewhttps://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.

@danielroedanielroe changed the title fix(nuxt): type for useRequestHeaders should allow for client-side …fix(nuxt): useRequestHeaders type should allow for undefinedJul 6, 2022
Comment threadpackages/nuxt/src/app/composables/ssr.ts
@pi0pi0 changed the title fix(nuxt): useRequestHeaders type should allow for undefinedfix(nuxt): useRequestHeaders type should allow for undefined valuesJul 6, 2022
@pi0
pi0 merged commit 490d686 into mainJul 6, 2022
@pi0
pi0 deleted the fix/headers-type branch July 6, 2022 19:00
@pi0pi0 mentioned this pull request Jul 11, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't working🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressingtypes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useRequestHeaders typing incorrect

2 participants

@danielroe@pi0