Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

312
Vistas
What does () mean if set as a interface property?

In the Vue.js source code (packages/reactivity/src/effects.ts), I found this:

export interface ReactiveEffectRunner<T = any> {
  (): T
  effect: ReactiveEffect
}

What does () mean in the code?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

When you want to define a function with other properties you make use of this pattern.

() means that the object implementing this interface will be a function which can be called and does not need any params.

effect means it has another property called effect.

An example from the docs:

type DescribableFunction = {
  description: string;
  (someArg: number): boolean;
};
function doSomething(fn: DescribableFunction) {
  console.log(fn.description + " returned " + fn(6));
}

Read about call signatures

about 4 years ago · Juan Pablo Isaza Denunciar

0

It means the type is executable as a function.

for example:

declare const fn: ReactiveEffectRunner<{ abc: number }>

const result = fn() // { abc: number }
fn.effect // ReactiveEffect

Playground

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda