Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Ensure TypeScript is installed before starting#289

Merged
andrewbranch merged 1 commit intomasterfrom
bug/wait-for-installation
May 6, 2020
Merged

Ensure TypeScript is installed before starting#289
andrewbranch merged 1 commit intomasterfrom
bug/wait-for-installation

Conversation

@andrewbranch
Copy link
Member

@andrewbranch andrewbranch commented May 6, 2020

This part of the code doesn’t have test coverage, but I validated it locally with @definitelytyped/dtslint-runner by npm linking it.

Also avoids installing all TypeScript versions under --listen mode when --onlyTestTsNext is passed.

function listen(dirPath: string, tsLocal: string | undefined): void {
process.on("message", (message: {}) => {
function listen(dirPath: string, tsLocal: string | undefined, onlyTestTsNext: boolean): void {
// Don't await this here to ensure that messages sent during installation aren't dropped.
Copy link
Member

Choose a reason for hiding this comment

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

I bet THAT was tough to figure out.

Copy link
Member Author

Choose a reason for hiding this comment

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

I bet it was, but I wasn’t the one who figured it out—I adapted this comment from one in listen’s caller.

@andrewbranch andrewbranch merged commit 7fdc359 into master May 6, 2020
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