webtoon / psd

Fast zero-dependency PSD parser for the web and Node.js
https://webtoon.github.io/psd
MIT License
1.21k stars 55 forks source link

feat!: remove unwanted exports or make them type-only exports #29

Closed pastelmind closed 2 years ago

pastelmind commented 2 years ago

Currently, we export many values including classes (Layer, Group) and methods (parse()). These expose implementation details and enable unsupported workflows (e.g. instantiating a Group directly).

To prevent this, we reduced our API surface:

We also refactored our code to continue supporting some workflows (e.g. traverseNode()).

Note: We still export enums (ColorMode, Depth, GuideDirection, SliceOrigin) by value.