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

Disallow use of implicit any type on variable declarations. #2943

Merged
merged 10 commits into from
May 27, 2024

Conversation

KenAJoh
Copy link
Collaborator

@KenAJoh KenAJoh commented May 16, 2024

Copy link

changeset-bot bot commented May 16, 2024

⚠️ No Changeset found

Latest commit: aa12ed1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@KenAJoh KenAJoh enabled auto-merge (squash) May 16, 2024 17:08
Copy link
Contributor

github-actions bot commented May 16, 2024

Storybook demo

5aa6a77ad | 81 komponenter | 182 stories

@@ -28,7 +28,7 @@ export const SearchNavigationProvider = ({

/* Add a small delay to get a precieved smoother navigation */
useEffect(() => {
let timeout: NodeJS.Timeout;
let timeout: ReturnType<typeof setTimeout>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change this?

Copy link
Collaborator Author

@KenAJoh KenAJoh May 27, 2024

Choose a reason for hiding this comment

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

Since setTimeout is implemented by the js runtime (engine implements it, but runtime exposes the function), it could in theory differ between nodejs, deno, hermes etc. So ReturnType<typeof setTimeout> will be more correct in this scenario (was my assumption atleast).

Found this since let timeout; caused errors elsewhere and thus lead me to this instance.

JulianNymark
JulianNymark previously approved these changes May 24, 2024
var i = 0, dpi: { updateZIndex: (arg0: number, arg1: number) => void };
(dpi = this.pendingDialogStack[i]);
++i
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Selv liker jeg "plain for loops" (helst liker jeg vel ikke for loops heller, foretrekker for of/in 😅 ) og ikke gjøre for mye i selve for expression-loop-condition blocken (feks definere og sette flere variabler), all type "videre logikk" liker jeg da å ha i body til loopen i steden, og heller ta opp flere linjer 🤔

Sier ikke at vi trenger refaktorere noe her (eller senere), bare merker jeg må tenke ekstra her 😅 (spesielt med ekstra type info!)

Copy link
Contributor

Choose a reason for hiding this comment

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

Helt enig. Hele dialog-polyfillen er bare copy-paste fra en annen pakke, så tør ikke gjøre for mye endringer der. Hadde det vært opp til meg hadde jeg bare tatt en "biome-ignore" og latt det være 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hadde selv også lyst til å sette biome-ignore først, så hvis dere tenker det samme gjør vi det 🚀

HalvorHaugan
HalvorHaugan previously approved these changes May 27, 2024
@KenAJoh KenAJoh disabled auto-merge May 27, 2024 12:04
@KenAJoh KenAJoh merged commit 50d5947 into main May 27, 2024
3 checks passed
@KenAJoh KenAJoh deleted the noImplicitAnyLet branch May 27, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants