Skip to content
New issue

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

fix: refactor the showcase stream method collect #1162

Merged
merged 2 commits into from
Jan 11, 2022
Merged

Conversation

summer-ji-eng
Copy link
Contributor

The compiler complains the augment type error for showcase test on stream method collect

test/fixtures/google-gax-packaging-test-app/src/index.ts:245:39 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(options?: CallOptions | undefined, callback?: Callback<IEchoResponse, IEchoRequest | null | undefined, {} | null | undefined> | undefined): CancellableStream', gave the following error.
    Type '(err: Error, result: { content: string; }) => void' has no properties in common with type 'CallOptions'.
  Overload 2 of 2, '(callback?: Callback<IEchoResponse, IEchoRequest | null | undefined, {} | null | undefined> | undefined): CancellableStream', gave the following error.
    Argument of type '(err: Error, result: {    content: string;}) => void' is not assignable to parameter of type 'Callback<IEchoResponse, IEchoRequest | null | undefined, {} | null | undefined>'.
      Types of parameters 'err' and 'err' are incompatible.
        Type 'Error | null | undefined' is not assignable to type 'Error'.
          Type 'undefined' is not assignable to type 'Error'.

245   const stream = await client.collect((err: Error, result: {content: string}) => {

@summer-ji-eng summer-ji-eng requested a review from a team as a code owner January 11, 2022 20:13
@summer-ji-eng summer-ji-eng merged commit 19d3a5d into main Jan 11, 2022
@summer-ji-eng summer-ji-eng deleted the fix_syntax branch January 11, 2022 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants