Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

370
Visualizações
What does the @ symbol mean in TypeScript (or possibly Vue/JavaScript)?

I am learning TypeScript and Vue.js.

I have come across a Vue theme that starts with @ on many lines.

What does it do exactly? Is this TypeScript, Javascript or Vue thing?

For example, in one of the Vue store module TypeScript files it looks like this (some code removed for brevity):

@Module
export default class BodyModule extends VuexModule implements StoreInfo {
  classes = {};

  @Mutation
  [Mutations.SET_CLASSNAME_BY_POSITION](payload) {
    const { position, className } = payload;
    if (!this.classes[position]) {
      this.classes[position] = [];
    }
    this.classes[position].push(className);
  }

  @Action
  [Actions.ADD_BODY_CLASSNAME](className) {
    document.body.classList.add(className);
  }

}

Many of those lines such as @Module, @Mutation, and @Action start with with the @ symbol.

I have not seen this many times before.

What does it do exactly?

It looks like a comment of sorts to me. If that is the case, why not use // instead?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda