Skip to content

Commit

Permalink
pw_rpc: Fix typing in unaryWait return value in TS client
Browse files Browse the repository at this point in the history
A branch ensures that a response exists, so it cannot be undefined.

Change-Id: Icac75b680d2eba23f79706f8d0f780544c34afdb
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/231071
Presubmit-Verified: CQ Bot Account <[email protected]>
Owners-Override: Alexei Frolov <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
Lint: Lint 🤖 <[email protected]>
Pigweed-Auto-Submit: Alexei Frolov <[email protected]>
Reviewed-by: Wyatt Hepler <[email protected]>
  • Loading branch information
frolv authored and CQ Bot Account committed Aug 20, 2024
1 parent 917de4a commit 3c61791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pw_rpc/ts/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export class Call {
if (this.responses.length !== 1) {
throw Error(`Unexpected number of responses: ${this.responses.length}`);
}
return [this.status!, this.responses.last()];
return [this.status!, this.responses.last()!];
}

protected async streamWait(timeoutMs?: number): Promise<[Status, Message[]]> {
Expand Down

0 comments on commit 3c61791

Please sign in to comment.