source: trip-planner-front/node_modules/@angular-devkit/schematics/src/sink/sink.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.8 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 { Observable } from 'rxjs';
10import { Action, CreateFileAction, DeleteFileAction, OverwriteFileAction, RenameFileAction } from '../tree/action';
11import { Tree } from '../tree/interface';
12export interface Sink {
13 commit(tree: Tree): Observable<void>;
14}
15export declare abstract class SimpleSinkBase implements Sink {
16 preCommitAction: (action: Action) => void | Action | PromiseLike<Action> | Observable<Action>;
17 postCommitAction: (action: Action) => void | Observable<void>;
18 preCommit: () => void | Observable<void>;
19 postCommit: () => void | Observable<void>;
20 protected abstract _validateFileExists(p: string): Observable<boolean>;
21 protected abstract _overwriteFile(path: string, content: Buffer): Observable<void>;
22 protected abstract _createFile(path: string, content: Buffer): Observable<void>;
23 protected abstract _renameFile(path: string, to: string): Observable<void>;
24 protected abstract _deleteFile(path: string): Observable<void>;
25 protected abstract _done(): Observable<void>;
26 protected _fileAlreadyExistException(path: string): void;
27 protected _fileDoesNotExistException(path: string): void;
28 protected _validateOverwriteAction(action: OverwriteFileAction): Observable<void>;
29 protected _validateCreateAction(action: CreateFileAction): Observable<void>;
30 protected _validateRenameAction(action: RenameFileAction): Observable<void>;
31 protected _validateDeleteAction(action: DeleteFileAction): Observable<void>;
32 validateSingleAction(action: Action): Observable<void>;
33 commitSingleAction(action: Action): Observable<void>;
34 commit(tree: Tree): Observable<void>;
35}
Note: See TracBrowser for help on using the repository browser.