Three underlying concrete methods combine to form the three types of export object.
This new functionality has a number of desireable properties:
Complete from an export analysis point of view (can interrogate all early linking errors)
Invariant of source minification
imports() and exports() analysis have distinct use cases (graph loading / tracing, versus export tracing respectively), and are designed specifically to serve those use cases.
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.
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:
imports()
andexports()
analysis have distinct use cases (graph loading / tracing, versus export tracing respectively), and are designed specifically to serve those use cases.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.