PackageExtractorOptionsinterface

{
	readonly tree: TreeElement;
	readonly extensions?: ImmutableDictionary<readonly string[]>;
	readonly module?: ModuleExtractor;
	readonly base?: AbsolutePath;
}
PropertyType
.treeTreeElement
Pre-extracted source tree the package.json exports resolve against — typically the result of
IndexExtractor(MergingExtractor(DirectoryExtractor())) over the source root. required readonly
.extensionsImmutableDictionary<readonly string[]>
Maps an export target file extension (the right-hand side of an exports entry) to the source extensions to look for, in order.
- Bridges built output and source: package.json targets a .js file but the tree holds the .ts source.
- The first source extension that exists in the tree wins; a target extension with no mapping falls back to itself.
- Defaults to { js: ["ts", "tsx", "js", "jsx"] }. readonly
.moduleModuleExtractor
ModuleExtractor used to build each module element. Defaults to a fresh new ModuleExtractor(). readonly
.baseAbsolutePath
Absolute base path used to resolve a relative package.json path passed to extract(). readonly

Options for a PackageExtractor.