import { ActionResult } from "../../action/ActionResult"; import { HandlerContext } from "../../HandlerContext"; import { Project } from "../../project/Project"; import { EditMode } from "./editModes"; /** * Modifies the given project, returning information about the modification. * @param p project to edit * @param context context for the current command or event handler * @param params params, if available */ export declare type ProjectEditor

= (p: Project, context?: HandlerContext, params?: P) => Promise; export declare type SimpleProjectEditor

= (p: Project, context?: HandlerContext, params?: P) => Promise; export declare type AnyProjectEditor

= ProjectEditor

| SimpleProjectEditor

; /** * Result of editing a project. More information may be added by instances. */ export interface EditResult

extends ActionResult

{ /** * Whether or not this project was edited. * Undefined if we don't know, as not all editors keep track of their doings. */ readonly edited?: boolean; /** * Populated only if editing was successful */ readonly editMode?: EditMode; } export declare function toEditor

(ed: (SimpleProjectEditor

| ProjectEditor

)): ProjectEditor

; export declare function successfulEdit

(p: P, edited: boolean): EditResult

; export declare function failedEdit

(p: P, error: Error, edited?: boolean): EditResult

; //# sourceMappingURL=projectEditor.d.ts.map