Skip to content

Newly created JS files are not added to configured project until server restart #43290

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

Closed
andrewbranch opened this issue Mar 17, 2021 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@andrewbranch
Copy link
Member

Bug Report

🔎 Search Terms

js inferred project restart server

🕗 Version & Regression Information

Tested on 4.3.0-dev.20210316

  • I was unable to test this on prior versions because that seemed like it would take a lot of time

💻 Code

tsconfig.json:

{
  "compilerOptions": {
    "lib": ["es2020"],
    "allowJs": true,
    "checkJs": true,
    "strict": true,
    "noEmit": true,
    "types": ["node"]
  }
}

Open project, then add a new JS file.

🙁 Actual behavior

It doesn’t get checked for errors, and can’t see globals declared in other JS files in the project. TS Server log shows the file added to a new inferred project instead of the configured project. After restarting TS Server, the file is in the configured project as expected.

🙂 Expected behavior

The file gets added to the configured project.

@MartinJohns
Copy link
Contributor

That sounds like #43280.

@andrewbranch andrewbranch added the Duplicate An existing issue was already created label Mar 17, 2021
@andrewbranch
Copy link
Member Author

Touché @DanielRosenwasser, you got me good, now I’ve gone and duplicated myself

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants