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

180
Visualizações
VS Code JavaScript Autocomplete with ESLint

Here is my code and it works as expected.

function Afunction(v) {
    this.v = v;
}
Afunction.prototype.vlog = function () { console.log(this.v); };

function extend(props) {
    for (const key in props) {
        const prop = props[key];
        Afunction.prototype[key] = prop;
    }
}

extend({
    someOther: function () { console.log("someOther"); },
    someMore: function () { console.log("someMore"); }
});

var obj = new Afunction();
obj.vlog();
obj.someOther();
obj.someMore();

and output

some value
someOther
someMore

But in my VS Code show only the vlog in autocomplete suggestion. someOther and someOther not display there.

enter image description here

I learn about the extend function in jQuery. I try to implement it in my flavor. But I face this auto complete issue there are so many function property in my object so if autocompletion work it will be great. Otherwise I have to write all the property function Afunction.prototype.someOther like this.

I see there are so many .ts file in ESLint folder if there are any way to make a map/interface file, so I once add all props there and it show me suggestion.

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