mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Revert "fix(grpc-js): Add support for impl type to server.addService"
This commit is contained in:
parent
e21f3374e8
commit
1fc284f59d
@ -144,13 +144,9 @@ export class Server {
|
||||
throw new Error('Not implemented. Use addService() instead');
|
||||
}
|
||||
|
||||
addService<
|
||||
ImplementationType extends {
|
||||
[key: string]: any
|
||||
}
|
||||
>(
|
||||
service: ServiceDefinition<ImplementationType>,
|
||||
implementation: ImplementationType
|
||||
addService(
|
||||
service: ServiceDefinition,
|
||||
implementation: UntypedServiceImplementation
|
||||
): void {
|
||||
if (this.started === true) {
|
||||
throw new Error("Can't add a service to a started server.");
|
||||
|
||||
@ -181,7 +181,7 @@ describe('Server', () => {
|
||||
const server = new Server();
|
||||
|
||||
assert.throws(() => {
|
||||
server.addService(({} as any), dummyImpls);
|
||||
server.addService({}, dummyImpls);
|
||||
}, /Cannot add an empty service to a server/);
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user