Skip to content

Make Message<T> have a default type param#1086

Merged
dcodeIO merged 1 commit intoprotobufjs:masterfrom
kjin:message-generic
Jul 17, 2018
Merged

Make Message<T> have a default type param#1086
dcodeIO merged 1 commit intoprotobufjs:masterfrom
kjin:message-generic

Conversation

@kjin
Copy link
Copy Markdown
Contributor

@kjin kjin commented Jul 16, 2018

For context: grpc/grpc-node#425

The type definitions for PB 5/6 are not mutually compatible because of the Message class: one requires that the generic type parameter doesn't exist, while the other one require that it does. As a result, we cannot publish type definitions that are compatible with both.

This PR gives Message<T> a default value for T to work around that. This doesn't relate to any need other than what I described above, so if there is a better way to solve the problem, I would be open to implementing suggestions.

@dcodeIO dcodeIO merged commit 36fc964 into protobufjs:master Jul 17, 2018
@dcodeIO
Copy link
Copy Markdown
Member

dcodeIO commented Jul 17, 2018

Makes sense, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants