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

218
Vistas
Is there a way to get autocomplete for .proto JavaScript generated code?

I've written a simple .proto file

syntax = "proto3";

message Event {
  optional string name = 1;
}

I've downloaded the protoc linux compiler (protoc-3.19.3-linux-x86_64.zip) and installed it in my local machine outside of the project's folder.

Then I installed the core runtime dependency with

$ npm i google-protobuf

My package.json shows:

"google-protobuf": "^3.19.3",

I then ran this line to generate the JS code from the .proto file

$ protoc --js_out=import_style=commonjs,binary:. protos/event.proto

It outputs some generated code that I can import with

const Schema = require("./protos/event_pb");

by inspecting Schema.Event I can see that my prop .name is in there, but I can't get any autocomplete going. Is there a way to achieve this?

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

0

Turns out there are some well-maintained npm packages that handle these things.

https://www.npmjs.com/package/protobufjs or https://www.npmjs.com/package/ts-proto

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