Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

171
Views
TS no reconoce la escritura en interpolación (Vue3 + Storybook)

Estoy tratando de escribir la implementación del componente Button estándar de Storybook, se suponía que debía escribirse, pero mi TS está dando un error en la interpolación dentro de la configuración, como en la imagen a continuación...

ingrese la descripción de la imagen aquí

No sé si es un error de sintaxis o un error de tsconfig, aquí está el fragmento del código en cuestión:

 export default defineComponent({ name: 'my-button', components: { VBtn }, props: { label: { type: Boolean, required: true, }, variation: String, size: { type: String, validator: function (value: string) { return ['small', 'medium', 'large'].indexOf(value) !== -1; }, }, backgroundColor: { type: String, }, }, emits: ['click'], setup(props, { emit }): typeSetup { props = reactive(props); return { classes: computed(() => ({ 'storybook-button': true, [`storybook-button--${props.variation}`]: true, [`storybook-button--${props.size || 'medium'}`]: true, })), style: computed(() => ({ backgroundColor: props.backgroundColor, })), onClick() { emit('click'); }, } }, });

Error:

 Property 'variation' does not exist on type 'Readonly<LooseRequired<Readonly<ExtractPropTypes<Readonly<ComponentPropsOptions<Data>>>>>
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!