Skip to content

Type issue with ServerReflectionService #611

@UncleSamSwiss

Description

@UncleSamSwiss

As of the latest versions (see below) the following code doesn't work anymore in typescript:

server.add(
  ServerReflectionService,
  ServerReflection(
    fs.readFileSync(path.join('path', 'to', 'protoset.bin')),
    // specify fully-qualified names of exposed services
    [MyService.fullName],
  ),
);

Error message:

Argument of type 'IServerReflectionService' is not assignable to parameter of type 'CompatServiceDefinition'.
  Type 'IServerReflectionService' is not assignable to type 'ServiceDefinition<UntypedServiceImplementation>'.
    Index signature for type 'string' is missing in type 'IServerReflectionService'.

Versions:

npm list nice-grpc
src@0.0.0 /src
├─┬ nice-grpc-server-reflection@2.0.11
│ └── nice-grpc@2.1.9 deduped
└── nice-grpc@2.1.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions