File size: 1,758 Bytes
31e8457 689aa9f 31e8457 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | import * as Param from "../Param.ts";
declare const ConfigInternalTypeId: "~effect/cli/Command/Config/Internal";
/**
* The processed internal representation of a Command.Config declaration.
*
* Created by parsing the user's config. Separates parameters by type
* while preserving the original nested structure via the tree.
*/
export interface ConfigInternal {
readonly [ConfigInternalTypeId]: typeof ConfigInternalTypeId;
/** The command's positional argument parameters. */
readonly arguments: ReadonlyArray<Param.AnyArgument>;
/** The command's flag parameters. */
readonly flags: ReadonlyArray<Param.AnyFlag>;
/** All parameters in declaration order. */
readonly orderedParams: ReadonlyArray<Param.Any>;
/** Tree structure for reconstructing nested config. */
readonly tree: ConfigInternal.Tree;
}
/**
* Namespace containing the tree and node types used to reconstruct parsed
* command configuration values.
*
* @since 4.0.0
*/
export declare namespace ConfigInternal {
/**
* Maps declaration keys to their node representations.
* Preserves the shape of the user's config object.
*/
interface Tree {
[key: string]: Node;
}
/**
* A node in the config tree.
*
* - Param: References a parameter by index in orderedParams
* - Array: Contains child nodes for tuple/array declarations
* - Nested: Contains a subtree for nested config objects
*/
type Node = {
readonly _tag: "Param";
readonly index: number;
} | {
readonly _tag: "Array";
readonly children: ReadonlyArray<Node>;
} | {
readonly _tag: "Nested";
readonly tree: Tree;
};
}
export {};
//# sourceMappingURL=config.d.ts.map |