import { ChangeSet, ChangeDesc, ChangeSpec } from "./change"; import { EditorState } from "./state"; import { EditorSelection } from "./selection"; import { Extension } from "./facet"; import { Text } from "@codemirror/next/text"; export declare class Annotation { readonly type: AnnotationType; readonly value: T; static define(): AnnotationType; private _isAnnotation; } export declare class AnnotationType { of(value: T): Annotation; } interface StateEffectSpec { map?: (value: Value, mapping: ChangeDesc) => Value | undefined; } export declare class StateEffect { readonly value: Value; map(mapping: ChangeDesc): StateEffect | undefined; is(type: StateEffectType): this is StateEffect; static define(spec?: StateEffectSpec): StateEffectType; static mapEffects(effects: readonly StateEffect[], mapping: ChangeDesc): readonly StateEffect[]; } export declare class StateEffectType { readonly map: (value: any, mapping: ChangeDesc) => any | undefined; of(value: Value): StateEffect; } export interface TransactionSpec { changes?: ChangeSpec; selection?: EditorSelection | { anchor: number; head?: number; }; effects?: StateEffect | readonly StateEffect[]; annotations?: Annotation | readonly Annotation[]; scrollIntoView?: boolean; reconfigure?: ReconfigurationSpec; filter?: boolean; sequential?: boolean; } export interface ReconfigurationSpec { full?: Extension; append?: Extension; [tag: string]: Extension | undefined; } export declare class Transaction { readonly startState: EditorState; readonly changes: ChangeSet; readonly selection: EditorSelection | undefined; readonly effects: readonly StateEffect[]; readonly reconfigure: ReconfigurationSpec | undefined; readonly scrollIntoView: boolean; get newDoc(): Text; get newSelection(): EditorSelection; get state(): EditorState; annotation(type: AnnotationType): T | undefined; get docChanged(): boolean; static time: AnnotationType; static userEvent: AnnotationType; static addToHistory: AnnotationType; } export declare function resolveTransaction(state: EditorState, specs: readonly TransactionSpec[], filter: boolean): Transaction; export declare function asArray(value: undefined | T | readonly T[]): readonly T[]; export {}; //# sourceMappingURL=transaction.d.ts.map