Disambiguation for load interface#518
Disambiguation for load interface#518eordano wants to merge 1 commit intoprotobufjs:masterfrom eordano:patch-1
load interface#518Conversation
This change allows the typechecker to know the type that is going to be returned.
|
Unfortunately, the .d.ts file is generated automatically through tsd-jsdoc and as thus needs a fix on jsdoc level. Edit: Could you let me know of your specific use case? For me, this seems to work: (protobuf.load("hello.proto") as Promise<protobuf.Root>).then((root) => {
...
}); |
…se or undefined, aliased Reader/Writer-as-function signature with Reader/Writer.create for typed dialects, see #518
|
Should work without type hints now (I believe nobody would use the non-promise return value anyway). |
|
Hey, sorry for the late reply. Thanks for fixing this! Using typescript 1.8 it complains about "Object" not having a |
|
The fix isn't published on npm, yet, so you are probably still using a .d.ts with the |
This change allows the typechecker to know the type that is going to be returned.