Skip to content

fix(web): add MouseEvent & IPolicy types #823

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

Merged
merged 2 commits into from
Jun 6, 2023
Merged

fix(web): add MouseEvent & IPolicy types #823

merged 2 commits into from
Jun 6, 2023

Conversation

kemuru
Copy link
Contributor

@kemuru kemuru commented May 11, 2023

(some lines got automatically formatted when doing the commit)

added MouseEvent & IPolicy types instead of any types.

There are still a few "any" types but starting to think it would be more confusing to remove them than to let them stay, explanation:

provider: any

Screenshot from 2023-05-11 23-31-05

this library should have included the type for this I guess, but its a bit messy and not clear. I found this hack, you could add to the package.json the following:

"resolutions": {
    "zustand": "^3.6.9"
  }

but still didnt work properly as it does with "any" and some other error appeared

maybeObjects: any[] | any

Screenshot from 2023-05-11 23-33-11

in this function you don't really know what's passing as parameter, so makes sense its any, you could make the type "unknown" too I guess, but its kind of the same

({ query, variables }: { query: string; variables?: any }

Screenshot from 2023-05-11 23-35-51

this took a while and I ended up thinking it could maybe be more confusing to add a type for this than to leave it like this. This "variables" parameter seems to be the input parameters for the query. At first I did this

Screenshot from 2023-05-11 21-10-18

but then I realized that you could maybe input objects as the query too, not just 1 string. so, not sure.

@netlify
Copy link

netlify bot commented May 11, 2023

Deploy Preview for kleros-v2 ready!

Name Link
🔨 Latest commit a9acd6b
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2/deploys/647ef2c74aff180007b352e1
😎 Deploy Preview https://deploy-preview-823--kleros-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@alcercu alcercu left a comment

Choose a reason for hiding this comment

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

lgtm

@netlify
Copy link

netlify bot commented Jun 6, 2023

Deploy Preview for kleros-v2-contracts ready!

Name Link
🔨 Latest commit a9acd6b
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2-contracts/deploys/647ef2c7170d060007ca2137
😎 Deploy Preview https://deploy-preview-823--kleros-v2-contracts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@alcercu alcercu merged commit 42cb23e into dev Jun 6, 2023
@alcercu alcercu deleted the fix(web)/any-types branch June 6, 2023 09:38
@jaybuidl jaybuidl added this to the alpha-1 milestone Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants