protobuf.js icon indicating copy to clipboard operation
protobuf.js copied to clipboard

Why Any uses type_url instead of typeUrl?

Open mahnunchik opened this issue 3 years ago • 3 comments

protobuf.js version: v7.0.0

Why Any uses type_url field instead of typeUrl?

// works
const any = Any.create({
  type_url: `'type.googleapis.com/foobar',
  value: buffer,
});

// type url is missing
const any = Any.create({
  typeUrl: `'type.googleapis.com/foobar',
  value: buffer,
});

mahnunchik avatar Jul 20 '22 15:07 mahnunchik

Declaration: https://github.com/protobufjs/protobuf.js/blob/64811d5878c31e4a86a39da5fec6aea35da22fcd/index.d.ts#L16-L19

mahnunchik avatar Jul 20 '22 17:07 mahnunchik

The actual executed definition of Any is https://github.com/protobufjs/protobuf.js/blob/master/src/common.js#L43-L65

murgatroid99 avatar Jul 20 '22 18:07 murgatroid99

Hi! Any chance it could be fixed?

gigi avatar Jan 22 '24 12:01 gigi