-
Notifications
You must be signed in to change notification settings - Fork 14
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: enable noImplicitAny
#519
Conversation
693f5ad
to
87c11c2
Compare
87c11c2
to
77e053e
Compare
@@ -19,22 +24,39 @@ const calcShrinkSteps = function (sourceW, targetW, targetH, step) { | |||
return steps.reverse() | |||
} | |||
|
|||
export const fallback = ({ img, sourceW, targetW, targetH, step }) => { | |||
export const fallback = ({ |
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.
Let's create type
TFallback = {
img: HTMLImageElement
sourceW: number
targetW: number
targetH: number
step: number
}
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.
done
@@ -1,7 +1,12 @@ | |||
import { testCanvasSize } from '../canvas/testCanvasSize' | |||
import { canvasResize } from '../canvas/canvasResize' | |||
|
|||
const calcShrinkSteps = function (sourceW, targetW, targetH, step) { | |||
const calcShrinkSteps = function ( |
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.
Might it be worth converting to obj? And we can use types Omit<TFallback, "img">
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.
done
img, | ||
targetW, | ||
targetH | ||
}: { |
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.
And here you can describe the types via TNative
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.
done
Chore/image-shrink-types
chore: testing setup for image shrink
No description provided.