-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typing grid clipboard store #15250
Typing grid clipboard store #15250
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
| { | ||
value: string | null | undefined | ||
multiCellCopy: false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really cool - I didn't know you can basically conditionally type it based on the value of another field like this.
const clipboard = writable({ | ||
type ClipboardStoreData = | ||
| { | ||
value: string[][] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value
here can be any cell value, so it doesn't need to just be a string. We could be specific about the range possible types but it can be any data type that we support, so any
is probably appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that the value would always be stringified. Updated to any
Description
Typing grid clipboard store