Skip to content

Commit

Permalink
fix: rpc plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nailiable committed Oct 29, 2024
1 parent d179f4a commit 26c6fb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/rpc/src/rpc-bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class RpcBootstrap<Adapter> extends BackendBootstrap {
* @return {this}
* @memberof RpcBootstrap
*/
use(rpcPlugin: RpcServerPlugin): this {
async use(rpcPlugin: RpcServerPlugin): Promise<this> {
this._rpcPlugins.push(rpcPlugin)
return this
}
Expand Down
3 changes: 2 additions & 1 deletion packages/rpc/src/rpc-plugin-protocol.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { PluginProtocol } from '@nailyjs/ioc'
import type { RpcBootstrap } from './rpc-bootstrap'

export interface RpcServerPlugin {
export interface RpcServerPlugin extends PluginProtocol {
name: string
beforeRun?(bootstrap: RpcBootstrap<any>): any
beforeListen?(bootstrap: RpcBootstrap<any>): any
Expand Down

0 comments on commit 26c6fb8

Please sign in to comment.