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 eslint issues addressed #175

Merged
merged 15 commits into from
Jul 5, 2023
Merged

More eslint issues addressed #175

merged 15 commits into from
Jul 5, 2023

Conversation

lhstrh
Copy link
Member

@lhstrh lhstrh commented Jul 1, 2023

Fixes #162.

@lhstrh lhstrh changed the title Usages of any type removed More eslint issues addressed Jul 1, 2023
@lhstrh
Copy link
Member Author

lhstrh commented Jul 2, 2023

I'm not sure what to do about the failing bank test...

@lhstrh
Copy link
Member Author

lhstrh commented Jul 2, 2023

@hokeun (original author of the test), to reproduce, check out this branch and run npm run test bank.

@axmmisaka
Copy link
Collaborator

The error message is a bit confusing to me:

Argument of type '(member: MultiPeriodic) => OutMultiPort<number>' is not assignable to parameter of type '(reactor: MultiPeriodic) => Port<unknown> | MultiPort<unknown>'.
      Type 'OutMultiPort<number>' is not assignable to type 'Port<unknown> | MultiPort<unknown>'.
        Type 'OutMultiPort<number>' is not assignable to type 'MultiPort<unknown>'.
          The types returned by 'channels()' are incompatible between these types.
            Type 'OutPort<number>[]' is not assignable to type 'IOPort<unknown>[]'.
              Type 'OutPort<number>' is not assignable to type 'IOPort<unknown>'.
                The types of 'asWritable(...).getPort().getManager(...).addReceiver' are incompatible between these types.
                  Type '(port: WritablePort<number>) => void' is not assignable to type '(port: WritablePort<unknown>) => void'.
                    Types of parameters 'port' and 'port' are incompatible.
                      Type 'WritablePort<unknown>' is not assignable to type 'WritablePort<number>'.
                        The types returned by 'get()' are incompatible between these types.
                          Type 'unknown' is not assignable to type 'number | undefined'.

Notice that Type '(port: WritablePort<number>) => void' is not assignable to type '(port: WritablePort<unknown>) => void'. is because that Type 'WritablePort<unknown>' is not assignable to type 'WritablePort<number>'., but we are assigning the other way around.

Copy link
Collaborator

@axmmisaka axmmisaka left a comment

Choose a reason for hiding this comment

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

👍🏼

@lhstrh lhstrh merged commit 9e9c142 into master Jul 5, 2023
@lhstrh lhstrh deleted the no-any branch July 5, 2023 01:14
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.

Various eslint-suggested fixes
2 participants