googleapis/gapic-generator-typescript

export protos

alexander-fenster opened this issue · 1 comments

We need to export protos from the generated src/index.ts:

export * as protos from '../protos/protos';   // works in TypeScript 3.8

import * as protos from '../protos/protos';
export {protos};    // if we are still on 3.7

When this change is made in the generator, we'll need to make a mass PR to apply this to all libraries (including those with manual src/index.ts - e.g. those having multiple versions).

cc: @JustinBeckwith @bcoe

Rationale: users are forced to do

import * as protos from "@google-cloud/text-to-speech/build/protos/protos";

which does not look great. Let's export those protos directly.