Skip to content
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

Merged
merged 11 commits into from
Feb 27, 2024
Merged

chore: enable noImplicitAny #519

merged 11 commits into from
Feb 27, 2024

Conversation

nd0ut
Copy link
Member

@nd0ut nd0ut commented Feb 16, 2024

No description provided.

@nd0ut nd0ut force-pushed the chore/enable-no-implicit-any branch 12 times, most recently from 693f5ad to 87c11c2 Compare February 16, 2024 17:31
@nd0ut nd0ut force-pushed the chore/enable-no-implicit-any branch from 87c11c2 to 77e053e Compare February 16, 2024 21:49
@@ -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 = ({
Copy link
Contributor

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
}

Copy link
Member Author

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 (
Copy link
Contributor

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">

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

img,
targetW,
targetH
}: {
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@nd0ut nd0ut merged commit 7db3b63 into master Feb 27, 2024
3 checks passed
@nd0ut nd0ut deleted the chore/enable-no-implicit-any branch February 27, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants