Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor: specify type at bbox #4732

Merged
merged 1 commit into from
Oct 19, 2024
Merged

Conversation

nayounsang
Copy link
Contributor

@nayounsang nayounsang commented Oct 19, 2024

Describe what your pull request does. If you can, add GIFs or images showing the before and after of your change.
I found that bbox's type is any.
Bbox is let variable, so I thought it would be good to improve.

Change type

  • bugfix
  • improvement
  • feature
  • api
  • other

Test plan

  1. yarn run test
  • Just I change the type, so logic is not changed. It just checks to see if there are any type errors.

  • Unit tests

  • End to end tests

Release notes

  • When I see the code in packages/editor/src/lib/exports/getSvgJsx.tsx, Improvements were found.
// L57
let bbox: = null // any type
  • This is declared as let, but it is any type.
  • I felt this was a risk for future maintenance.
  • So I specify the type of bbox.
let bbox: null | Box = null

@huppy-bot huppy-bot bot added the improvement Product improvement label Oct 19, 2024
Copy link

vercel bot commented Oct 19, 2024

@nayounsang is attempting to deploy a commit to the tldraw Team on Vercel.

A member of the Team first needs to authorize it.

@steveruizok
Copy link
Collaborator

Thanks @nayounsang !

@steveruizok steveruizok added this pull request to the merge queue Oct 19, 2024
Merged via the queue into tldraw:main with commit 8ff67b9 Oct 19, 2024
7 of 11 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
improvement Product improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants