source: trip-planner-front/node_modules/@angular-devkit/core/src/workspace/json/metadata.d.ts@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { JsonAstArray, JsonAstKeyValue, JsonAstNode, JsonAstObject, JsonValue } from '../../json';
9import { ProjectDefinition, TargetDefinition, WorkspaceDefinition } from '../definitions';
10export declare const JsonWorkspaceSymbol: unique symbol;
11export interface JsonWorkspaceDefinition extends WorkspaceDefinition {
12 [JsonWorkspaceSymbol]: JsonWorkspaceMetadata;
13}
14interface ChangeValues {
15 json: JsonValue;
16 project: ProjectDefinition;
17 target: TargetDefinition;
18 projectcollection: Iterable<[string, ProjectDefinition]>;
19 targetcollection: Iterable<[string, TargetDefinition]>;
20}
21export interface JsonChange<T extends keyof ChangeValues = keyof ChangeValues> {
22 op: T extends 'json' | 'project' | 'target' ? 'add' | 'remove' | 'replace' : 'add';
23 path: string;
24 node: JsonAstNode | JsonAstKeyValue;
25 value?: ChangeValues[T];
26 type: T;
27}
28export declare class JsonWorkspaceMetadata {
29 readonly filePath: string;
30 readonly ast: JsonAstObject;
31 readonly raw: string;
32 readonly changes: JsonChange[];
33 constructor(filePath: string, ast: JsonAstObject, raw: string);
34 get hasChanges(): boolean;
35 get changeCount(): number;
36 findChangesForPath(path: string): JsonChange[];
37 addChange<T extends keyof ChangeValues = keyof ChangeValues>(op: 'add' | 'remove' | 'replace', path: string, node: JsonAstArray | JsonAstObject | JsonAstKeyValue, value?: ChangeValues[T], type?: T): void;
38 reset(): void;
39}
40export {};
Note: See TracBrowser for help on using the repository browser.