Remove docs for Editor.batch (#3451)

Remove misleading docs for `Editor.batch`.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix
This commit is contained in:
Steve Ruiz 2024-04-11 17:57:14 +01:00 committed by GitHub
parent 6d5ec149fa
commit 6cd498a1ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 14 deletions

View file

@ -7947,7 +7947,7 @@
{ {
"kind": "Method", "kind": "Method",
"canonicalReference": "@tldraw/editor!Editor#batch:member(1)", "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": [ "excerptTokens": [
{ {
"kind": "Content", "kind": "Content",

View file

@ -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. * Run a function in a batch.
*
* @example
* ```ts
* editor.batch(() => {
* editor.selectAll()
* editor.deleteShapes(editor.getSelectedShapeIds())
* editor.createShapes(myShapes)
* editor.selectNone()
* })
*
* editor.undo() // will undo all of the above
* ```
* *
* @public * @public
*/ */