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

fix(schema): add back PublicRuntimeConfig interface for augmentation - #4849

Merged
pi0 merged 3 commits into
mainfrom
fix/runtimeconfig-typing
May 6, 2022
Merged

fix(schema): add back PublicRuntimeConfig interface for augmentation#4849
pi0 merged 3 commits into
mainfrom
fix/runtimeconfig-typing

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#13808

❓ 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 PR restores the PublicRuntimeConfig interface, as a vehicle for augmenting types for runtimeConfig['public'] which otherwise can't really be done. (Otherwise each augmentation would completely override the type of public.)

Particularly value your input @pi0 as you touched this last.

📝 Checklist

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

@danielroe
danielroe requested a review from pi0May 6, 2022 12:56
@danielroedanielroe self-assigned this May 6, 2022
@netlify

netlifyBot commented May 6, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commitb59e1e8
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/627521c07bbae70009f57500

pi0
pi0 approved these changes May 6, 2022
Comment threadpackages/schema/src/types/config.ts
pi0
pi0 approved these changes May 6, 2022
@pi0
pi0 merged commit e0125f4 into mainMay 6, 2022
@pi0
pi0 deleted the fix/runtimeconfig-typing branch May 6, 2022 13:27
@pi0pi0 mentioned this pull request May 6, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typing of useRuntimeConfig.public

2 participants

@danielroe@pi0