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

Fixed an issue with a reference to @types/node being inserted into XState's compiled output #3012

Merged
merged 1 commit into from
Feb 4, 2022

Conversation

Andarist
Copy link
Member

@Andarist Andarist commented Feb 4, 2022

fixes #3010

@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2022

🦋 Changeset detected

Latest commit: c5dfe84

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
xstate Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ghost
Copy link

ghost commented Feb 4, 2022

CodeSee Review Map:

Review these changes using an interactive CodeSee Map

Review in an interactive map

View more CodeSee Maps

Legend

CodeSee Map Legend

@@ -140,7 +143,7 @@ export class Interpreter<
clearTimeout: (id) => {
return clearTimeout(id);
}
},
} as Clock,
Copy link
Member Author

Choose a reason for hiding this comment

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

For some reason, tsc has started to infer the setTimeout's return type of this default clock to be of type NodeJS.Timeout. That in turn has caused it to include /// <reference types="node" /> at the top of the file and that has created the reported issue.

@davidkpiano
Copy link
Member

A couple of type errors, but after that LGTM

@Andarist
Copy link
Member Author

Andarist commented Feb 4, 2022

@davidkpiano i've removed that ReturnType thing - it made mocking the clock harder. This should help CI to pass 🤞

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 4, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c5dfe84:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

@Andarist Andarist merged commit ab431dc into main Feb 4, 2022
@Andarist Andarist deleted the andarist/fix-3010 branch February 4, 2022 15:41
@github-actions github-actions bot mentioned this pull request Feb 4, 2022
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.

Bug: Node.js types are included in 4.29.0
3 participants