Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
TypeScript: Convert
text-sets
package #12274TypeScript: Convert
text-sets
package #12274Changes from 11 commits
a18878f
8543fb5
9b4d600
95e9135
7209133
97c8de2
76964ae
b8a5983
65a2cbc
25d20a8
e30554b
909a194
22491fa
02bbe8e
77e387f
e99fad8
42f7603
ef56344
ed4be89
9f30175
e255104
366b793
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
as
is a rather crude tool that should only be applied if no better tool exists, as it will actually ignore and suppress some potential errors. However, moving it to a typed variable or just setting the return type won't do the trick, becausefromEntries
doesn't play nice (typed as returningany
).This required updating the type system a bit as:
And then
loadTextSets
becomes:The
Partial<>
is a bit annoying but I don't see a clean way around it? I feel this is cleaner, but it's probably just a nit really.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.
If I am honest, I don't find your code easier to read or understand. I have pushed up my own version of the code, that is a little easier to follow. See ed4be89
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.
@barklund Can you take a look ?