smolijar/protocat

Export additional types

Closed this issue ยท 4 comments

Currently, the ProtoCatCall type is not exported from the public API, which requires the service implementer to either:

  • Type it as any and loose type safety entirely
  • Write his own type mimicking ProtoCat's one

Could we expose this type (and possibly others I can't think of) from the public API?

Sure we could. I will try to get to it early next week, but feel free to post a PR.

As a current unaesthetic workaround until next realease, better than any or copy-paste is to import from dist subdir.

import { ProtoCatCall } from 'protocat/dist/lib/server/call'

Thanks for reporting ๐Ÿ‘

Released under 0.5.2 ๐Ÿš€

Thanks!

Thanks!