Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typings issue in version 1.9.0 #176

Closed
respinha opened this issue Feb 9, 2018 · 6 comments
Closed

Typings issue in version 1.9.0 #176

respinha opened this issue Feb 9, 2018 · 6 comments
Assignees

Comments

@respinha
Copy link

respinha commented Feb 9, 2018

If I run tsc -d on my Typescript source I get the following message:

../../../../../grpc/index.d.ts(69,50): error TS2314: Generic type 'Message<T>' requires 1 type argument(s).                                                  

grpc-node version: 1.9.0
Typescript version: 2.7.1
tsconfig.json compiler options:

"compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true
  }
@murgatroid99
Copy link
Member

I have published version 1.9.1, which includes a fix for this issue.

@miv
Copy link

miv commented Apr 14, 2018

I think this fix is wrong. node-grpc is using protobufjs ^5.0.0 as a dependency, and in this version of protobufjs's typings Message is not a generic class.

@zachgrayio
Copy link

@murgatroid99 It seems this might still be an issue; tsc was failing for me until I installed v1.9.0 (pre your change mentioned above) and then it compiled fine.

Message: node_modules/grpc/index.d.ts(69,50): error TS2315: Type 'Message' is not generic.

@mhoeger
Copy link

mhoeger commented May 11, 2018

@murgatroid99 I'm having the same issue with grpc version 1.11.3. I'm trying to use pbjs (protobufjs), but keep running into node_modules/grpc/index.d.ts(69,50): error TS2315: Type 'Message' is not generic.

@kjin
Copy link
Contributor

kjin commented Jun 12, 2018

@respinha-ribeiro Can you comment on which version of Protobuf.js type definitions you are using? The fix for this change seems to break other users.

@FedeBev
Copy link

FedeBev commented Jul 10, 2018

@miv is right, this package use protobufjs 5 so you should import @types/protobufjs@^5.x.x in you project.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants