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

Type error on master #1745

Closed
mpetrunic opened this issue Nov 10, 2020 · 4 comments · Fixed by #1796
Closed

Type error on master #1745

mpetrunic opened this issue Nov 10, 2020 · 4 comments · Fixed by #1796

Comments

@mpetrunic
Copy link
Member

Describe the bug

There is type error present in code on master.

Expected behavior

No type errors.

Steps to Reproduce

lerna run check-types

Screenshots

@chainsafe/lodestar: test/unit/sync/regular/oneRangeAhead/oneRangeAhead.test.ts:77:7 - error TS2345: Argument of type '(blocks: import("/home/mpetrunic/projects/eth2/lodestar/packages/lodestar-types/lib/types/block").SignedBeaconBlock[], signal: import("/home/mpetrunic/projects/eth2/lodestar/node_modules/abort-controller/dist/abort-controller").AbortSignal) => Promise<...>' is not assignable to parameter of type '(blocks: import("/home/mpetrunic/projects/eth2/lodestar/packages/lodestar-types/src/types/block").SignedBeaconBlock[], signal: AbortSignal) => Promise<void>'.
@chainsafe/lodestar:   Types of parameters 'signal' and 'signal' are incompatible.
@chainsafe/lodestar:     Type 'AbortSignal' is not assignable to type 'import("/home/mpetrunic/projects/eth2/lodestar/node_modules/abort-controller/dist/abort-controller").AbortSignal'.
@chainsafe/lodestar:       Types of property 'dispatchEvent' are incompatible.
@chainsafe/lodestar:         Type '(event: Event) => boolean' is not assignable to type '<TEventType extends string>(event: EventData<Events, TEventType, "loose">) => boolean'.
@chainsafe/lodestar:           Types of parameters 'event' and 'event' are incompatible.
@chainsafe/lodestar:             Type 'EventData<Events, TEventType, "loose">' is not assignable to type 'Event'.
@chainsafe/lodestar:               Type 'Event | NonStandardEvent | (Pick<Events[TEventType], Exclude<keyof Events[TEventType], "target" | "currentTarget" | ... 18 more ... | "timeStamp">> & Partial<...>)' is not assignable to type 'Event'.
@chainsafe/lodestar:                 Type 'NonStandardEvent' is not assignable to type 'Event'.
@chainsafe/lodestar:                   Type 'Event | NonStandardEvent' is not assignable to type 'Event'.
@chainsafe/lodestar:                     Type 'NonStandardEvent' is missing the following properties from type 'Event': bubbles, cancelBubble, cancelable, composed, and 17 more.
@chainsafe/lodestar: 77       async (blocks: SignedBeaconBlock[], signal: AbortSignal): Promise<void> => {
@chainsafe/lodestar:          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@chainsafe/lodestar: Found 1 error.
@chainsafe/lodestar: error Command failed with exit code 1.

Desktop (please complete the following information):

  • OS:
  • Version:
  • Branch:
  • Commit hash:

cc @tuyennhv seems like it's related to new regular sync

@dapplion
Copy link
Contributor

How can a Typescript compilation error make it to master?

@mpetrunic
Copy link
Member Author

Because yarn run check-type was removed from CI. Not sure why

@dapplion
Copy link
Contributor

Why isn't checking the types part of the compilation / build process?

@mpetrunic
Copy link
Member Author

no idea

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 a pull request may close this issue.

2 participants