wasExplicit
Generated reference page for the wasExplicit function export.
- Import:
@kjanat/dreamcli - Export kind: function
- Declared in:
src/core/schema/provenance.ts - Source link:
src/core/schema/provenance.ts:87
Signatures
ts
function wasExplicit(source: ResolutionProvenance | undefined): boolean;| Parameter | Type | Description |
|---|---|---|
source | ResolutionProvenance | undefined | The provenance record of one input, or undefined. |
Members
Members
wasExplicit
Whether a value came from somewhere other than its declared default.
Every stage but 'default' means the value was supplied: typed on the command line, piped, exported, written in a config file, or answered at a prompt. An input that resolved no value at all has no record and is not explicit.
Read stage directly for a narrower question, such as stage === 'cli' for "the user typed it on this command line".
ts
(source: ResolutionProvenance | undefined): boolean;Examples
ts
command('build')
.flag('out', flag.string().default('dist'))
.action(({ sources, out }) => {
if (wasExplicit(sources.flags.out)) out.info('using an overridden output');
});