loreanvictor / tyfon

typed functions over network
https://loreanvictor.github.io/tyfon
MIT License
37 stars 4 forks source link

bundle SDK types #3

Closed loreanvictor closed 3 years ago

loreanvictor commented 3 years ago

Right now SDK types are not bundled and declarations emitted by typescript are utilized. This causes types/functions exported from non-root files to also be included in the SDK, which can become problematic if these intermediary types do include references to non-local (external) types.

A simple test shows dts-bundle-generator to be a good candidate for resolving this issue. Regardless of choice of bundler, types should be bundled, with intermediary types excluded from the bundle, and the bundle should be provided for the SDK metadata.