source: trip-planner-front/node_modules/@angular-devkit/schematics/src/tree/action.d.ts@ e29cc2e

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

initial commit

  • Property mode set to 100644
File size: 1.9 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 */
8/// <reference types="node" />
9import { BaseException, Path } from '@angular-devkit/core';
10export declare class UnknownActionException extends BaseException {
11 constructor(action: Action);
12}
13export declare type Action = CreateFileAction | OverwriteFileAction | RenameFileAction | DeleteFileAction;
14export interface ActionBase {
15 readonly id: number;
16 readonly parent: number;
17 readonly path: Path;
18}
19export declare class ActionList implements Iterable<Action> {
20 private _actions;
21 protected _action(action: Partial<Action>): void;
22 create(path: Path, content: Buffer): void;
23 overwrite(path: Path, content: Buffer): void;
24 rename(path: Path, to: Path): void;
25 delete(path: Path): void;
26 optimize(): void;
27 push(action: Action): void;
28 get(i: number): Action;
29 has(action: Action): boolean;
30 find(predicate: (value: Action) => boolean): Action | null;
31 forEach(fn: (value: Action, index: number, array: Action[]) => void, thisArg?: {}): void;
32 get length(): number;
33 [Symbol.iterator](): IterableIterator<Action>;
34}
35export declare function isContentAction(action: Action): action is CreateFileAction | OverwriteFileAction;
36/**
37 * @deprecated since version 11.0. not used anymore can be removed in future version.
38 */
39export declare function isAction(action: any): action is Action;
40export interface CreateFileAction extends ActionBase {
41 readonly kind: 'c';
42 readonly content: Buffer;
43}
44export interface OverwriteFileAction extends ActionBase {
45 readonly kind: 'o';
46 readonly content: Buffer;
47}
48export interface RenameFileAction extends ActionBase {
49 readonly kind: 'r';
50 readonly to: Path;
51}
52export interface DeleteFileAction extends ActionBase {
53 readonly kind: 'd';
54}
Note: See TracBrowser for help on using the repository browser.