93c2ed615c
Currently, we type our fractional index keys as `string` and don't have any validation for them. I'm touching some of this code for my work on line handles and wanted to change that: - fractional indexes are now `IndexKey`s, not `string`s. `IndexKey`s have a brand property so can't be used interchangeably with strings (like our IDs) - There's a new `T.indexKey` validator which we can use in our validations to make sure we don't end up with nonsense keys. This PR is part of a series - please don't merge it until the things before it have landed! 1. #2827 (you are here) 2. #2831 3. #2793 4. #2841 5. #2845 ### Change Type - [x] `patch` — Bug fix ### Test Plan 1. Mostly relying on unit & end to end tests here - no user facing changes. - [x] Unit Tests |
||
---|---|---|
.. | ||
api | ||
src | ||
api-extractor.json | ||
api-report.md | ||
CHANGELOG.md | ||
LICENSE.md | ||
package.json | ||
README.md | ||
tsconfig.json |
@tldraw/utils
This package contains utility functions used in various places by other tldraw packages.
Community
Have questions, comments or feedback? Join our discord or start a discussion.
Distributions
You can find tldraw on npm here.
Contribution
Please see our contributing guide. Found a bug? Please submit an issue.
License
The tldraw source code and its distributions are provided under the tldraw license. This license does not permit commercial use.
If you wish to use this project in commercial product, you need to purchase a commercial license. Please contact us at hello@tldraw.com for more inforion about obtaining a commercial license.
Trademarks
Copyright (c) 2023-present tldraw Inc. The tldraw name and logo are trademarks of tldraw. Please see our trademark guidelines for info on acceptable usage.
Contact
Find us on Twitter at @tldraw or email hello@tldraw.com. You can also join our discord for quick help and support.