import { ICursorInfo } from '../diff'; import { IAttributeMap } from './AttributeMap'; import { IOp } from './Op'; declare class Delta { ops: IOp[]; constructor(ops?: IOp[] | { ops: IOp[]; }); insert(arg: string | object, attributes?: IAttributeMap): this; delete(length: number): this; retain(length: number, attributes?: IAttributeMap): this; push(newOp: IOp): this; chop(): this; filter(predicate: (op: IOp, index: number) => boolean): IOp[]; forEach(predicate: (op: IOp, index: number) => void): void; map(predicate: (op: IOp, index: number) => T): T[]; partition(predicate: (op: IOp) => boolean): [IOp[], IOp[]]; reduce(predicate: (accum: T, curr: IOp, index: number) => T, initialValue: T): T; changeLength(): number; length(): number; slice(start?: number, end?: number): Delta; compose(other: Delta): Delta; concat(other: Delta): Delta; diff(other: Delta, cursor?: number | ICursorInfo): Delta; eachLine(predicate: (line: Delta, attributes: IAttributeMap, index: number) => boolean | void, newline?: string): void; invert(base: Delta): Delta; transform(index: number, priority?: boolean): number; transform(other: Delta, priority?: boolean): Delta; transformPosition(index: number, priority?: boolean): number; } export = Delta;