grpc-node
grpc-node copied to clipboard
'UntypedHandleCall' is not defined
Problem description
For some reason, I am getting eslint errors for adding [name: string]: grpc.UntypedHandleCall to my implementation of an interface that extends grpc.UntypedServiceImplementation:

Reproduction steps
import * as grpc from '@grpc/grpc-js'
interface ISomeServer extends grpc.UntypedServiceImplementation {}
class SomeServer implements ISomeServer {
[name: string]: grpc.UntypedHandleCall
}
Environment
- OS name, version and architecture:
macOS Monterey 12.4 x86 - Node version
v16.13.0 - Node installation method
nvm - If applicable, compiler version [e.g. clang 3.8.0-2ubuntu4]
- Package name and version
"@grpc/grpc-js": "^1.4.2"
Additional context
This only seems to happen in the class that implements the interface. If I define something outside of the class, like:
type UntypedHandleCall = grpc.UntypedHandleCall
it does not have the error.
That reproduction code doesn't reproduce the error for me with the latest version of grpc-js. I compiled it with the typescript compiler and loaded it in VSCode, both without errors.