Skip to content

Commit

Permalink
chore: allow synthetic default imports for ESM-compatibility, and ign…
Browse files Browse the repository at this point in the history
…ore erroneous TS failures (#5853)

* chore: update code for ESM-compatibiliity

* Update adaptation_client.ts

* Update speech_client.ts

* Update adaptation_client.ts

* Update speech_client.ts

* Update speech_client.ts

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
sofisl and gcf-owl-bot[bot] authored Dec 4, 2024
1 parent c7e55d4 commit 8a689e2
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/google-cloud-speech/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].

1. [Select or create a Cloud Platform project][projects].
1. [Enable the Cloud Speech API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
1. [Set up authentication][auth] so you can access the
API from your local workstation.

### Installing the client library
Expand Down Expand Up @@ -218,4 +218,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=speech.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
3 changes: 3 additions & 0 deletions packages/google-cloud-speech/protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/google-cloud-speech/src/v1/adaptation_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export class AdaptationClient {
}

// Choose either gRPC or proto-over-HTTP implementation of google-gax.
// @ts-ignore
this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;

// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
Expand Down
1 change: 1 addition & 0 deletions packages/google-cloud-speech/src/v1/speech_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export class SpeechClient {
}

// Choose either gRPC or proto-over-HTTP implementation of google-gax.
// @ts-ignore
this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;

// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export class AdaptationClient {
}

// Choose either gRPC or proto-over-HTTP implementation of google-gax.
// @ts-ignore
this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;

// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export class SpeechClient {
}

// Choose either gRPC or proto-over-HTTP implementation of google-gax.
// @ts-ignore
this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;

// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
Expand Down
1 change: 1 addition & 0 deletions packages/google-cloud-speech/src/v2/speech_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export class SpeechClient {
}

// Choose either gRPC or proto-over-HTTP implementation of google-gax.
// @ts-ignore
this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;

// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
Expand Down
1 change: 1 addition & 0 deletions packages/google-cloud-speech/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"rootDir": ".",
"outDir": "build",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"lib": [
"es2018",
"dom"
Expand Down

0 comments on commit 8a689e2

Please sign in to comment.