/**
* @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 { Observable } from 'rxjs';
import { Action, CreateFileAction, DeleteFileAction, OverwriteFileAction, RenameFileAction } from '../tree/action';
import { Tree } from '../tree/interface';
export interface Sink {
commit(tree: Tree): Observable;
}
export declare abstract class SimpleSinkBase implements Sink {
preCommitAction: (action: Action) => void | Action | PromiseLike | Observable;
postCommitAction: (action: Action) => void | Observable;
preCommit: () => void | Observable;
postCommit: () => void | Observable;
protected abstract _validateFileExists(p: string): Observable;
protected abstract _overwriteFile(path: string, content: Buffer): Observable;
protected abstract _createFile(path: string, content: Buffer): Observable;
protected abstract _renameFile(path: string, to: string): Observable;
protected abstract _deleteFile(path: string): Observable;
protected abstract _done(): Observable;
protected _fileAlreadyExistException(path: string): void;
protected _fileDoesNotExistException(path: string): void;
protected _validateOverwriteAction(action: OverwriteFileAction): Observable;
protected _validateCreateAction(action: CreateFileAction): Observable;
protected _validateRenameAction(action: RenameFileAction): Observable;
protected _validateDeleteAction(action: DeleteFileAction): Observable;
validateSingleAction(action: Action): Observable;
commitSingleAction(action: Action): Observable;
commit(tree: Tree): Observable;
}