Skip to content

Unable to add custom imports for pbts generated types #1034

@thegecko

Description

@thegecko

protobuf.js version: master

When using a custom target for pbjs I expect to be able to have generated classes inherit from a custom base class (as opposed to something from the protobufjs codebase, e.g. protobuf.Rpc.Service).

This can be achieved by writing out a require in the template, but when it comes to generating the types with pbts, the requires are lost and tsc fails.

I see there is a hardcoded import added by pbts:

https://github.com/dcodeIO/protobuf.js/blob/master/cli/pbts.js#L146

JSDoc doesn't seem to support imports/requires, so is there a way to add custom imports?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions