We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protobuf.js version: 6.10.1
After importing protobufjs/ext/descriptor, I should be able to call the fromDescriptor and toDescriptor methods without Typescript complaining
protobufjs/ext/descriptor
fromDescriptor
toDescriptor
import { Message, Root } from 'protobufjs'; import * as descriptor from "protobufjs/ext/descriptor"; const root = new Root(); root.fromDescriptor({} as Message<descriptor.IFileDescriptorSet>);
Property 'fromDescriptor' does not exist on type 'typeof Root'.ts
Workaround (inspired by proto-loader):
proto-loader
declare module 'protobufjs' { interface Root { toDescriptor(protoVersion: string): Protobuf.Message<descriptor.IFileDescriptorSet> & descriptor.IFileDescriptorSet; fromDescriptor(descriptor: IFileDescriptorSet | $protobuf.Reader | Uint8Array): Root; } }
The text was updated successfully, but these errors were encountered:
just got into the same issue working on creating a test case for #1784
Sorry, something went wrong.
No branches or pull requests
protobuf.js version: 6.10.1
After importing
protobufjs/ext/descriptor
, I should be able to call thefromDescriptor
andtoDescriptor
methods without Typescript complainingWorkaround (inspired by
proto-loader
):The text was updated successfully, but these errors were encountered: