Skip to main content

UndoStackEntry

Holds undo state

Functions

new

UndoStackEntry.new() → UndoStackEntry

Constructs a new undo restack entry. See UndoStack for usage.

isUndoStackEntry

UndoStackEntry.isUndoStackEntry(valueany) → boolean

Returns true if the etnry is an undo stack entry

SetPromiseUndo

UndoStackEntry:SetPromiseUndo(promiseUndofunction | nil) → ()

Sets the handler that will undo the result

SetPromiseRedo

UndoStackEntry:SetPromiseRedo(promiseRedofunction | nil) → ()

Sets the handler that will redo the result

HasUndo

UndoStackEntry:HasUndo() → boolean

Returns true if this entry can be undone

HasRedo

UndoStackEntry:HasRedo() → boolean

Returns true if this entry can be redone

PromiseUndo

UndoStackEntry:PromiseUndo(maidMaid) → Promise

Promises undo. Should be done via UndoStack.PromiseUndo

PromiseRedo

UndoStackEntry:PromiseRedo(maidMaid) → Promise

Promises redo execution. Should be done via UndoStack.PromiseRedo

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new undo restack entry. See [UndoStack] for usage.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "UndoStackEntry"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 23,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "isUndoStackEntry",
            "desc": "Returns true if the etnry is an undo stack entry",
            "params": [
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 41,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "SetPromiseUndo",
            "desc": "Sets the handler that will undo the result",
            "params": [
                {
                    "name": "promiseUndo",
                    "desc": "",
                    "lua_type": "function | nil"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 50,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "SetPromiseRedo",
            "desc": "Sets the handler that will redo the result",
            "params": [
                {
                    "name": "promiseRedo",
                    "desc": "",
                    "lua_type": "function | nil"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 61,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "HasUndo",
            "desc": "Returns true if this entry can be undone",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 71,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "HasRedo",
            "desc": "Returns true if this entry can be redone",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 79,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "PromiseUndo",
            "desc": "Promises undo. Should be done via [UndoStack.PromiseUndo]",
            "params": [
                {
                    "name": "maid",
                    "desc": "",
                    "lua_type": "Maid"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 89,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "PromiseRedo",
            "desc": "Promises redo execution. Should be done via [UndoStack.PromiseRedo]",
            "params": [
                {
                    "name": "maid",
                    "desc": "",
                    "lua_type": "Maid"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 110,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "UndoStackEntry",
    "desc": "Holds undo state",
    "source": {
        "line": 5,
        "path": "src/undostack/src/Shared/UndoStackEntry.lua"
    }
}