sanctuary-js / sanctuary-def

Run-time type system for JavaScript
MIT License
293 stars 24 forks source link

types: define Buffer #294

Closed davidchambers closed 4 years ago

davidchambers commented 4 years ago

This was recently requested by @jceb in sanctuary-js/sanctuary#575.

Avaq commented 4 years ago

The code and approach look good to me. However, I would've probably separated any environment-specific types out into their own packages. I could imagine sanctuary-html, sanctuary-node, (and sanctuary-deno?) packages that each provide envs and utilities for their corresponding environments. Sanctuary-def's env would then only contain JavaScript's built-in types.

davidchambers commented 4 years ago

Providing separate packages for various environments is certainly an option worth considering. :)