-
Notifications
You must be signed in to change notification settings - Fork 27
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
Including enums brings tons of unnecessary code into the bundle #41
Comments
Hi, It exists a union type that force everything to be included, it's a part of the FHIR object definition. I guess there was reasons behind the enum type, but I can't remember ... Maybe it was just a lack of maturity with Typescript. Feel free to contribute a produce a Pull Request. |
FWIW this issue also exists in Microsoft's https://github.com/microsoft/fhir-codegen . @Ahryman40k Are you intending on maintaining this project? We might be interested in helping and really appreciate the work! |
Hi @preston, I'm happy to discover that Microsoft doesn't do better than I can :) Hope It answers your questions. |
If you do
and webpack it, it’ll bring ~75K of stuff from typescript-fhir-types and io. And if you include
HumanNameUseKind
from@ahryman40k/ts-fhir-types/lib/R4
, it’ll bring the entire library into the bundle.If only we could use string literal types instead of enums… This would allow type-only imports, with zero code actually
require()
d.The text was updated successfully, but these errors were encountered: