代码之家  ›  专栏  ›  技术社区  ›  Jscti

Angular6库:如何导出生成的protobuf模型?

  •  2
  • Jscti  · 技术社区  · 6 年前

    我有3个项目 common-lib (在同一个存储库中,多个项目)。 公共库 成功导出公共组件/服务/实用程序。

    我认为这与protobufs是JS文件而不是TS文件(但是存在声明TS文件)有关

    有什么帮助吗?

    公共api:

    export * from './lib/models/errors/ui'; // ok, it's a .ts file
    export * from './lib/models/protobuf-generated/public/API_pb'; // ko, it's a .d.ts file and .js file
    export * from './lib/models/protobuf-generated/public/API_pb_service'; // ko, it's a .d.ts file and .js file
    

    enter image description here

    0 回复  |  直到 6 年前