Skip to content

fix: use required: false rather than default: undefined for props#1450

Merged
danielroe merged 1 commit into
mainfrom
fix/prop-types
Aug 28, 2024
Merged

fix: use required: false rather than default: undefined for props#1450
danielroe merged 1 commit into
mainfrom
fix/prop-types

Conversation

@danielroe

@danielroe danielroe commented Aug 28, 2024

Copy link
Copy Markdown
Member

🔗 Linked issue

❓ 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)
  • ✨ 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

It feels like this might be a vue bug with prop type inference, but otherwise strange errors were occurring, e.g.:

<template>
  <NuxtImg
    v-if="uwuCookie"
    sizes="343px md:455px"
    width="455"
    height="256"
    class="mx-auto lg:my-16"
    src="/uwu.png"
    alt="Nuxt Logo in uwu style"
  />
</template>
pages/index.vue:86:9 - error TS2322: Type 'string' is not assignable to type 'undefined'.

86         sizes="343px md:455px"
           ~~~~~

https://github.com/nuxt/nuxt.com/actions/runs/10596463874/job/29364485513?pr=1650

@codecov-commenter

codecov-commenter commented Aug 28, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.95%. Comparing base (917242a) to head (e7de65c).
⚠️ Report is 563 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1450   +/-   ##
=======================================
  Coverage   61.95%   61.95%           
=======================================
  Files          79       79           
  Lines        3609     3609           
  Branches      391      393    +2     
=======================================
  Hits         2236     2236           
  Misses       1343     1343           
  Partials       30       30           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danielroe danielroe merged commit 92a6eee into main Aug 28, 2024
@danielroe danielroe deleted the fix/prop-types branch August 28, 2024 12:31
This was referenced Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants