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

Another chunk of lint issues #45

Merged
merged 3 commits into from
Jan 23, 2025
Merged

Conversation

tstirrat15
Copy link
Contributor

Description

Still knocking out lint issues.

Changes

  • Lint fixes. Will annotate.

Testing

Review.

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 5:46pm

Copy link
Contributor Author

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

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

See comments

@@ -8,10 +8,12 @@ import DialogTitle from "@material-ui/core/DialogTitle";
import TextField from "@material-ui/core/TextField";
import React, { useState } from "react";

export type ConfirmValue = "undefined" | "load" | "replace" | "nevermind"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of the generics in this and ConfirmDialogProvider were around taking these value values and making sure that they were tracked by the typesystem. I got to a place where typescript was complaining that two apparently-identical types were distinct and therefore not assignable to each other. I made the decision that it wasn't worth the complexity, in favor of explicitly typing the ConfirmValue.

The downside of this approach is that this enumeration needs to change every time that a new desired value for value is added, but given the way we're matching on the values, that's probably okay.

All other changes in these files are propagating this change.

Comment on lines +28 to +32
Go: new () => {
importObject: WebAssembly.Imports;
run: (instance: object) => void;
};
Crate: new (options: Options) => Crate;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This adds some window typing for our Go and discord Crate usages.

Copy link

@alecmerdler alecmerdler left a comment

Choose a reason for hiding this comment

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

🚀

@tstirrat15 tstirrat15 merged commit fa89362 into main Jan 23, 2025
4 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants