Remove docs for Editor.batch (#3451)

Remove misleading docs for `Editor.batch`.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix
pull/3452/head^2
Steve Ruiz 2024-04-11 17:57:14 +01:00 zatwierdzone przez GitHub
rodzic 6d5ec149fa
commit 6cd498a1ed
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 2 dodań i 14 usunięć

Wyświetl plik

@ -7947,7 +7947,7 @@
{
"kind": "Method",
"canonicalReference": "@tldraw/editor!Editor#batch:member(1)",
"docComment": "/**\n * Run a function in a batch, which will be undone/redone as a single action.\n *\n * @example\n * ```ts\n * editor.batch(() => {\n * \teditor.selectAll()\n * \teditor.deleteShapes(editor.getSelectedShapeIds())\n * \teditor.createShapes(myShapes)\n * \teditor.selectNone()\n * })\n *\n * editor.undo() // will undo all of the above\n * ```\n *\n * @public\n */\n",
"docComment": "/**\n * Run a function in a batch.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",

Wyświetl plik

@ -885,19 +885,7 @@ export class Editor extends EventEmitter<TLEventMap> {
}
/**
* Run a function in a batch, which will be undone/redone as a single action.
*
* @example
* ```ts
* editor.batch(() => {
* editor.selectAll()
* editor.deleteShapes(editor.getSelectedShapeIds())
* editor.createShapes(myShapes)
* editor.selectNone()
* })
*
* editor.undo() // will undo all of the above
* ```
* Run a function in a batch.
*
* @public
*/