-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
chore(TS): Add more type-checks for remaining files #9097
Conversation
return ['overline', 'underline', 'line-through'] | ||
.filter((decoration) => style[decoration.replace('-', '')]) | ||
.join(' '); | ||
} |
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.
moved to the text svg export
Build Stats
|
92a41d7
to
81ecadf
Compare
largestWordWidth = Math.max(width, largestWordWidth); | ||
offset += word.length + infix.length; | ||
return { word, width }; | ||
return { word: graphemeArray, width }; |
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.
@ShaMan123 we changed this function recently.
Word is a string, but then it becomes string or string[] ( because graphemeSplit returns string[];
GraphemeData is defined as wanting string, but definetely here is getting also string[];
I have tried to make this function more straight forward but i m blocked.
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 noticed it when working on it but was afraid to touch it
Your fix looks valid, change GraphemeData
type to accept both because it can, since it does value[index]
if I recall correctly
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.
but it doesn't pass type check :)
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 line fails typing and seems it should because I think it applyViewboxTransform
return immediatly so no need to call it...
please check it, svg logic is a black box to me
i wanted to keep element parser part of its on pr, i ll extract that commit in a new branch |
i will merge this and work on the 2 remainin big files |
Motivation
Continue to extend type checks
Changes
Gist
In Action