import { SchematicContext, Tree } from '@angular-devkit/schematics';
import { WorkspaceSchema, WorkspaceProject, ProjectType } from '@schematics/angular/utility/workspace-models';
import { Attribute, Element, Node } from '@angular/compiler';
export declare const getProjectPaths: (config: WorkspaceSchema, appendPrefix?: boolean) => string[];
export declare const getWorkspacePath: (host: Tree) => string;
export declare const getWorkspace: (host: Tree) => WorkspaceSchema;
export declare const getProjects: (config: WorkspaceSchema) => WorkspaceProject<ProjectType.Application>[];
export declare const escapeRegExp: (string: any) => any;
export declare const supports: (name: string) => boolean;
export declare const getPackageManager: (host: Tree) => "yarn" | "npm";
export declare const canResolvePackage: (pkg: string) => boolean;
export declare const tryInstallPackage: (context: SchematicContext, packageManager: string, pkg: string) => void;
export declare const tryUninstallPackage: (context: SchematicContext, packageManager: string, pkg: string) => void;
interface TagOffset {
    start: number;
    end: number;
}
export interface SourceOffset {
    startTag: TagOffset;
    endTag: TagOffset;
    file: {
        content: string;
        url: string;
    };
    node?: Element;
}
export declare class FileChange {
    position: number;
    text: string;
    replaceText: string;
    type: 'insert' | 'replace';
    constructor(position?: number, text?: string, replaceText?: string, type?: 'insert' | 'replace');
    apply(content: string): string;
}
/**
 * Parses an Angular template file/content and returns an array of the root nodes of the file.
 *
 * @param host
 * @param filePath
 * @param encoding
 */
export declare const parseFile: (host: Tree, filePath: string, encoding?: string) => Node[];
export declare const findElementNodes: (root: Node[], tag: string | string[]) => Node[];
export declare const hasAttribute: (root: Element, attribute: string | string[]) => boolean;
export declare const getAttribute: (root: Element, attribute: string | string[]) => Attribute[];
export declare const getSourceOffset: (element: Element) => SourceOffset;
/**
 * Given an array of `Node` objects, flattens the ast tree to a single array.
 * De facto only `Element` type objects have children.
 *
 * @param list
 */
export declare const flatten: (list: Node[]) => Node[];
export declare const serializeNodes: (nodes: Node[]) => string[];
export {};
