loadLayeredFromContent
loadLayeredFromContent<
T>(options):Promise<LayeredResult<T> |null>
Defined in: cli/datapad/src/load-layered-from-content/load-layered-from-content.ts:30
loadLayered for config files that live somewhere other than the local disk (a GitHub API, a git blob): the
dedicated <name>.config.* layered over the [fallback.key] of <fallback.file>.config.*, each probed through
options.fetch and executed in options.dir, then merged with mergeLayers (the dedicated file wins). Returns
null when neither layer resolves; filepath and sources are the paths as fetch was asked for them
(astromech.config.ts), lowest priority first.
A source that is found but cannot be executed throws a ConfigFileError whose filepath is that path, so a
caller can say which file failed. Whatever fetch throws (a network failure, a permission error) propagates as it is.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”options
Section titled “options”LoadLayeredFromContentOptions<T>
Returns
Section titled “Returns”Promise<LayeredResult<T> | null>