-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the library tree shakable #31
Comments
I'll have to think on this for a while and experiment when I have some extra time, but my gut reaction is that this may not be possible, or the ways it could be possible may be too big of a downgrade in consistency and ease of use. This would be major rewrite of the entire library with a completely different TBD approach of how to get the generic types working as desired, so don't hold your breath for this. I will think about it and play around with some ideas when I have time. This not just a library of individual functions that could be individually imported. A majority of this library is an From a runtime implementation perspective, it's easy to imagine ways I could break this class up into an object of cached data per enum in the |
Hi, I've been considering this problem for a few days and recently published a library called I want to clarify that I really like the API design using the Feel free to check it out and see if it meets your needs. |
Using
import { $enum } from "ts-enum-util";
will always import the full library even tho just one function of it is used.Preferable it would be possible to import just what is needed, e.g.:
Motivation: Both in the browser as in serverless (edge) functions bundle size is very important.
The text was updated successfully, but these errors were encountered: