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

More Lint Fixes #43

Merged
merged 1 commit into from
Jan 22, 2025
Merged

More Lint Fixes #43

merged 1 commit into from
Jan 22, 2025

Conversation

tstirrat15
Copy link
Contributor

Description

Closer to getting lint sorted.

Changes

  • Add some types to the visnetwork file
  • Fix some types
  • Remove some unused vars

Testing

Review. See that things pass.

Copy link

vercel bot commented Jan 22, 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 22, 2025 10:37pm

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 annotations

@@ -58,6 +58,15 @@ interface VisGraphDefinition<N extends VisNode, E extends VisEdge> {
nodes: N[], edges: E[]
}

interface VisDataSet {
update: (data: object) => void
Copy link
Contributor Author

Choose a reason for hiding this comment

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

object is like one step above any, but it's useful when you just want to say "yeah it's an object"

@@ -403,7 +403,7 @@ function generateExpressionGraph(
const edges: LocalEdge[] = [];

switch (expression.kind) {
case 'relationref':
case 'relationref': {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wrapping blocks in brackets so that the declarations are properly scoped

@@ -91,11 +92,13 @@ describe('parsing', () => {

expect(parsed?.definitions?.length).toEqual(1);

const definition = parsed?.definitions[0]! as ParsedObjectDefinition;
const definition = parsed?.definitions[0];
assert(definition)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using insert instead of type assertions

@tstirrat15 tstirrat15 merged commit ed29e0d into main Jan 22, 2025
4 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 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