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

chore(kit): improve types for addTemplate #25109

Merged
merged 3 commits into from Jan 12, 2024
Merged

chore(kit): improve types for addTemplate #25109

merged 3 commits into from Jan 12, 2024

Conversation

ineshbose
Copy link
Member

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Providing better type definition with the options property along with the right definition for getContents parameter, and cleaned up redundant code where we were typing the context.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

Copy link

stackblitz bot commented Jan 8, 2024

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

@github-actions github-actions bot added the 3.x label Jan 8, 2024
@danielroe
Copy link
Member

/ecosystem-ci run

@nuxt-ecosystem-ci
Copy link

πŸ“ Ran ecosystem CI on 00e92f8: Open

suite result latest scheduled
starter βœ… success βœ… success
content ❌ failure βœ… success
ui βœ… success βœ… success
image βœ… success ❌ failure
pinia βœ… success βœ… success
examples βœ… success βœ… success
bridge βœ… success βœ… success
nuxt-com βœ… success βœ… success
vite-pwa βœ… success βœ… success
docus βœ… success βœ… success
og-image βœ… success βœ… success
histoire ❌ failure ❌ failure
elk ❌ failure ❌ failure
devtools βœ… success βœ… success
cli βœ… success βœ… success
test-utils βœ… success βœ… success
module-builder βœ… success βœ… success
sanity-module βœ… success βœ… success
sitemap βœ… success undefined undefined
i18n-module βœ… success βœ… success

Co-authored-by: Daniel Roe <daniel@roe.dev>
@danielroe
Copy link
Member

This failure looks like an issue in nuxt/content - nicely discovered through this PR. πŸ™Œ

@danielroe
Copy link
Member

Oh - one comment. IIRC, we changed the type signature in Nuxt 3 vs Nuxt 2. We should confirm that this type is accurate for Nuxt 2 projects as well πŸ€”

@danielroe danielroe merged commit 406b204 into nuxt:main Jan 12, 2024
34 checks passed
This was referenced Jan 12, 2024
brawaru added a commit to brawaru/nuxt that referenced this pull request Jan 31, 2024
nuxt/nuxt#25109 introduced options types to
addTemplate, which caused TypeScript to explode because it's a bit
stoopid (big mood) and cannot infer a generic type that's referenced
within the initialisation of that type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants