Skip to content

[pull] main from tldraw:main#494

Merged
pull[bot] merged 1 commit into
code:mainfrom
tldraw:main
Apr 14, 2026
Merged

[pull] main from tldraw:main#494
pull[bot] merged 1 commit into
code:mainfrom
tldraw:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 14, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Closes #8456

In order to fix the TypeScript signature mismatch where `ShapeUtil` base
class methods declare a `shape` parameter that overrides omit, this PR
cleans up both sides: the base class param names are tidied (removing
unnecessary underscore prefixes on `canBind` and
`canReceiveNewChildrenOfType`), and override implementations that had
unused `_shape` params from an earlier pass now omit them entirely —
TypeScript allows omitting trailing parameters in overrides, so they
only need to appear in implementations that actually reference the
shape.

### Change type

- [x] `bugfix`

### Test plan

1. Create image, video, note, text, geo, arrow, frame, embed, and line
shapes
2. Verify resize, crop, and other interactions work as before

- [ ] Unit tests
- [ ] End to end tests

### Release notes

- Fixed ShapeUtil method signatures so overrides that need the `shape`
parameter can declare it without TypeScript errors.

### API changes

Changes to `packages/editor/api-report.api.md`:
- `ShapeUtil.canBind(_opts)` → `ShapeUtil.canBind(opts)` — removed
underscore prefix
- `ShapeUtil.canReceiveNewChildrenOfType(shape, _type)` →
`ShapeUtil.canReceiveNewChildrenOfType(shape, type)` — removed
underscore prefix

### Code changes

| Section         | LOC change |
| --------------- | ---------- |
| Core code       | +2 / -2   |
| Automated files | +2 / -2   |
| Documentation   | +4 / -4   |
| Templates       | +3 / -3   |

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Apr 14, 2026
@pull pull Bot added the ⤵️ pull label Apr 14, 2026
@pull pull Bot merged commit 5aa1794 into code:main Apr 14, 2026
9 of 12 checks passed
@pull pull Bot had a problem deploying to deploy-production April 14, 2026 09:13 Failure
@pull pull Bot had a problem deploying to vsce publish April 14, 2026 09:13 Failure
@pull pull Bot had a problem deploying to deploy-staging April 14, 2026 09:13 Error
@pull pull Bot had a problem deploying to deploy-staging April 14, 2026 09:13 Failure
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant