-
-
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): Remove ts-nocheck from pattern and add types #8605
Conversation
Build Stats
|
Actions are not starting for me today, i wonder what is going on. |
@@ -141,7 +137,7 @@ export class Pattern { | |||
this.source.naturalWidth === 0 || | |||
this.source.naturalHeight === 0)) | |||
) { | |||
return ''; | |||
return null; |
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.
doesn't this cause a problem in canvas?
I understand why you prefer this
I would look into usage and do || ''
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 tried, if you set up a non valid color for canvas, you still get black.
so null or empty string it doesn't change.
empty string is as non valid as null for a fillStyle/strokeStyle.
createPattern api from context can also return null if pattern creation fails.
Motivation
Finish TS migration for this file
Description
Changes
Removed the setOptions method for Pattern.
Gist
In Action