tc39 / proposal-esm-phase-imports

https://tc39.es/proposal-esm-phase-imports/
MIT License
35 stars 1 forks source link

Granular exports analysis #22

Open guybedford opened 1 month ago

guybedford commented 1 month ago

This adds support for granular exports analysis as described in https://github.com/tc39/proposal-esm-phase-imports/issues/20#issuecomment-2305458992.

Three underlying concrete methods combine to form the three types of export object.

This new functionality has a number of desireable properties:

The only added cost of this new analysis is that determining the direct string list of export names now requires working through this list and extracting the names based on the type discriminant of each expected output, but that seems like the necessary tradeoff here.