import { Attribute, Element, RecursiveVisitor } from '@angular/compiler'; import ts from 'typescript'; export declare const newDatatableDirective = "adtDatatable"; export declare const oldDatatableDirective = "datatable"; export declare const startMarker = "\u25EC"; export declare const endMarker = "\u2722"; export declare const oldImportIdentifier = "DatatableDirective"; export declare const newImportIdentifier = "AngularDatatable"; export interface Offsets { post: number; pre: number; } export interface Result { offsets: Offsets; template: string; } /** * Represents a range of text within a file. Omitting the end means that it's until the end of the file. */ interface Range { end?: number; node: ts.Node; start: number; type: string; } /** * Represents a file that was analyzed by the migration. */ export declare class AnalyzedFile { callExpressionRanges: Range[]; importRanges: Range[]; propertyDeclarationRanges: Range[]; sourceFile: ts.SourceFile; templateRanges: Range[]; private ranges; constructor(sourceFile: ts.SourceFile); /** * Returns the ranges in the order in which they should be migrated. * @returns The ranges */ getSortedRanges(): Range[]; /** * Adds a text range to an `AnalyzedFile`. * @param path Path of the file. * @param sourceFile The source file * @param analyzedFiles Map keeping track of all the analyzed files. * @param range Range to be added. */ static addRange(path: string, sourceFile: ts.SourceFile, analyzedFiles: Map, range: Range): void; } /** * Represents an element with a migratable attribute */ export declare class ElementToMigrate { attribute: Attribute; element: Element; hasLineBreaks: boolean; nestCount: number; constructor(element: Element, attribute: Attribute); attributeEnd(offset: number): number; attributeStart(offset: number): number; end(offset: number): number; length(): number; start(offset: number): number; } /** * Finds all elements with datatables directives. */ export declare class ElementCollector extends RecursiveVisitor { private myAttributes; readonly elements: ElementToMigrate[]; constructor(myAttributes?: string[]); visitElement(element: Element): void; } export {};