gcanti / io-ts-types

A collection of codecs and combinators for use with io-ts
https://gcanti.github.io/io-ts-types/
MIT License
311 stars 40 forks source link

io-ts-types is published with source maps but no source #106

Closed baetheus closed 5 years ago

baetheus commented 5 years ago

Source maps are compiled while building io-ts-types but the source files they reference are not published. This makes the source maps useless for debugging. There are two solutions that I can think of for this.

  1. Remove sourcemaps: set sourcemap: false in tsconfig.json
  2. Include source in published packages: add "src" to package.json files array

Since io-ts and io-ts-types are meant as runtime safety tools, any failing code that uses them should be easily debuggable via mapped stack trace, so I recommend option 2. However, it appears that neither fp-ts nor io-ts ship with sourcemaps or source, so the usefulness of including sourcemaps or source in packages here is questionable.