mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Merge pull request #538 from cjihrig/return-await
grpc-js-core: remove use of return await
This commit is contained in:
commit
1b11238d38
@ -185,7 +185,7 @@ export class CompressionFilter extends BaseFilter implements Filter {
|
||||
* compressed, and the output message is deframed and uncompressed. So
|
||||
* this is another reason that this filter should be at the bottom of the
|
||||
* filter stack. */
|
||||
return await this.receiveCompression.readMessage(await message);
|
||||
return this.receiveCompression.readMessage(await message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -19,23 +19,23 @@ export interface Filter {
|
||||
|
||||
export abstract class BaseFilter {
|
||||
async sendMetadata(metadata: Promise<Metadata>): Promise<Metadata> {
|
||||
return await metadata;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
async receiveMetadata(metadata: Promise<Metadata>): Promise<Metadata> {
|
||||
return await metadata;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
async sendMessage(message: Promise<WriteObject>): Promise<WriteObject> {
|
||||
return await message;
|
||||
return message;
|
||||
}
|
||||
|
||||
async receiveMessage(message: Promise<Buffer>): Promise<Buffer> {
|
||||
return await message;
|
||||
return message;
|
||||
}
|
||||
|
||||
async receiveTrailers(status: Promise<StatusObject>): Promise<StatusObject> {
|
||||
return await status;
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user