mirror of https://github.com/grpc/grpc-node.git
Merge pull request #1560 from grpc/revert-1556-master
Revert "fix(grpc-js): Add support for impl type to server.addService"
This commit is contained in:
commit
f2d3b4d1ed
|
@ -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…
Reference in New Issue