aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/@angular/cli/models/interface.d.ts
blob: 02bd8ccc60491684b3c8deafdadfe2f15963892a (plain) (blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */
import { analytics, json, logging } from '@angular-devkit/core';
import { AngularWorkspace } from '../utilities/config';
/**
 * Value type of arguments.
 */
export declare type Value = number | string | boolean | (number | string | boolean)[];
/**
 * An object representing parsed arguments from the command line.
 */
export interface Arguments {
    [argName: string]: Value | undefined;
    /**
     * Extra arguments that were not parsed. Will be omitted if all arguments were parsed.
     */
    '--'?: string[];
}
/**
 * The base interface for Command, understood by the command runner.
 */
export interface CommandInterface<T extends Arguments = Arguments> {
    printHelp(options: T): Promise<number>;
    printJsonHelp(options: T): Promise<number>;
    validateAndRun(options: T): Promise<number>;
}
/**
 * Command constructor.
 */
export interface CommandConstructor {
    new (context: CommandContext, description: CommandDescription, logger: logging.Logger): CommandInterface;
}
/**
 * A command runner context.
 */
export interface CommandContext {
    currentDirectory: string;
    root: string;
    workspace?: AngularWorkspace;
    analytics?: analytics.Analytics;
}
/**
 * Value types of an Option.
 */
export declare enum OptionType {
    Any = "any",
    Array = "array",
    Boolean = "boolean",
    Number = "number",
    String = "string"
}
/**
 * An option description. This is exposed when using `ng --help=json`.
 */
export interface Option {
    /**
     * The name of the option.
     */
    name: string;
    /**
     * A short description of the option.
     */
    description: string;
    /**
     * The type of option value. If multiple types exist, this type will be the first one, and the
     * types array will contain all types accepted.
     */
    type: OptionType;
    /**
     * {@see type}
     */
    types?: OptionType[];
    /**
     * If this field is set, only values contained in this field are valid. This array can be mixed
     * types (strings, numbers, boolean). For example, if this field is "enum: ['hello', true]",
     * then "type" will be either string or boolean, types will be at least both, and the values
     * accepted will only be either 'hello' or true (not false or any other string).
     * This mean that prefixing with `no-` will not work on this field.
     */
    enum?: Value[];
    /**
     * If this option maps to a subcommand in the parent command, will contain all the subcommands
     * supported. There is a maximum of 1 subcommand Option per command, and the type of this
     * option will always be "string" (no other types). The value of this option will map into
     * this map and return the extra information.
     */
    subcommands?: {
        [name: string]: SubCommandDescription;
    };
    /**
     * Aliases supported by this option.
     */
    aliases: string[];
    /**
     * Whether this option is required or not.
     */
    required?: boolean;
    /**
     * Format field of this option.
     */
    format?: string;
    /**
     * Whether this option should be hidden from the help output. It will still show up in JSON help.
     */
    hidden?: boolean;
    /**
     * Default value of this option.
     */
    default?: string | number | boolean;
    /**
     * If this option can be used as an argument, the position of the argument. Otherwise omitted.
     */
    positional?: number;
    /**
     * Smart default object.
     */
    $default?: OptionSmartDefault;
    /**
     * Whether or not to report this option to the Angular Team, and which custom field to use.
     * If this is falsey, do not report this option.
     */
    userAnalytics?: number;
    /**
     * Deprecation. If this flag is not false a warning will be shown on the console. Either `true`
     * or a string to show the user as a notice.
     */
    deprecated?: boolean | string;
}
/**
 * Scope of the command.
 */
export declare enum CommandScope {
    InProject = "in",
    OutProject = "out",
    Everywhere = "all",
    Default = "in"
}
/**
 * A description of a command and its options.
 */
export interface SubCommandDescription {
    /**
     * The name of the subcommand.
     */
    name: string;
    /**
     * Short description (1-2 lines) of this sub command.
     */
    description: string;
    /**
     * A long description of the sub command, in Markdown format.
     */
    longDescription?: string;
    /**
     * Additional notes about usage of this sub command, in Markdown format.
     */
    usageNotes?: string;
    /**
     * List of all supported options.
     */
    options: Option[];
    /**
     * Aliases supported for this sub command.
     */
    aliases: string[];
}
/**
 * A description of a command, its metadata.
 */
export interface CommandDescription extends SubCommandDescription {
    /**
     * Scope of the command, whether it can be executed in a project, outside of a project or
     * anywhere.
     */
    scope: CommandScope;
    /**
     * Whether this command should be hidden from a list of all commands.
     */
    hidden: boolean;
    /**
     * The constructor of the command, which should be extending the abstract Command<> class.
     */
    impl: CommandConstructor;
}
export interface OptionSmartDefault {
    $source: string;
    [key: string]: json.JsonValue;
}
export interface CommandDescriptionMap {
    [key: string]: CommandDescription;
}