UNPKG

1.01 kBTypeScriptView Raw
1/// <reference types="node" />
2import { Writable } from 'stream';
3import { Configuration } from './Configuration';
4import * as formatUtils from './formatUtils';
5export declare type TreeNode = {
6 label?: string;
7 value?: formatUtils.Tuple;
8 children?: Array<TreeNode> | TreeMap;
9};
10export declare type TreeMap = {
11 [key: string]: TreeNode;
12};
13export declare type TreeifyNode = {
14 [key: string]: TreeifyNode;
15};
16export declare function treeNodeToTreeify(printTree: TreeNode, { configuration }: {
17 configuration: Configuration;
18}): {};
19export declare function treeNodeToJson(printTree: TreeNode): any;
20export declare function emitList(values: Array<formatUtils.Tuple>, { configuration, stdout, json }: {
21 configuration: Configuration;
22 stdout: Writable;
23 json: boolean;
24}): void;
25export declare function emitTree(tree: TreeNode, { configuration, stdout, json, separators }: {
26 configuration: Configuration;
27 stdout: Writable;
28 json: boolean;
29 separators?: number;
30}): void;