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(selfUndoStackEntry) → boolean

Returns true if this entry can be undone

HasRedo

UndoStackEntry.HasRedo(selfUndoStackEntry) → 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": 36,
                "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": 54,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "SetPromiseUndo",
            "desc": "Sets the handler that will undo the result",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "UndoStackEntry"
                },
                {
                    "name": "promiseUndo",
                    "desc": "",
                    "lua_type": "function | nil"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 63,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "SetPromiseRedo",
            "desc": "Sets the handler that will redo the result",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "UndoStackEntry"
                },
                {
                    "name": "promiseRedo",
                    "desc": "",
                    "lua_type": "function | nil"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 74,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "HasUndo",
            "desc": "Returns true if this entry can be undone",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "UndoStackEntry"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 84,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "HasRedo",
            "desc": "Returns true if this entry can be redone",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "UndoStackEntry"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 92,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "PromiseUndo",
            "desc": "Promises undo. Should be done via [UndoStack.PromiseUndo]",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "UndoStackEntry"
                },
                {
                    "name": "maid",
                    "desc": "",
                    "lua_type": "Maid"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 102,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        },
        {
            "name": "PromiseRedo",
            "desc": "Promises redo execution. Should be done via [UndoStack.PromiseRedo]",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "UndoStackEntry"
                },
                {
                    "name": "maid",
                    "desc": "",
                    "lua_type": "Maid"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 124,
                "path": "src/undostack/src/Shared/UndoStackEntry.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "UndoStackEntry",
    "desc": "Holds undo state",
    "source": {
        "line": 6,
        "path": "src/undostack/src/Shared/UndoStackEntry.lua"
    }
}