grpc-node icon indicating copy to clipboard operation
grpc-node copied to clipboard

'UntypedHandleCall' is not defined

Open eliw00d opened this issue 3 years ago • 1 comments

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:

image

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.

eliw00d avatar Aug 03 '22 13:08 eliw00d

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.

murgatroid99 avatar Aug 05 '22 17:08 murgatroid99