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

Typescript features not working since latest update #72016

Closed
jmeyers91 opened this issue Apr 9, 2019 · 3 comments
Closed

Typescript features not working since latest update #72016

jmeyers91 opened this issue Apr 9, 2019 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) typescript Typescript support issues

Comments

@jmeyers91
Copy link

jmeyers91 commented Apr 9, 2019

  • VSCode Version: 1.33.0 and 1.34.0-insider
  • OS Version: OSX 10.14.3

Steps to Reproduce:

I'm not able to make a reproducible example. I tried by following these steps:

  1. Copy affected project
  2. Delete components, tests, pages, utils, types, etc. until the issue went away

Seemingly at random the typescript features started working while I was removing some JSX from a component. Then I hit CMD-Z a few times to undo the change, and the features continued to work.

Other things I've tried:

  • Deleted typescript cache from ~/Library/Caches
  • Deleted VS Code and reinstalled
  • Installed insider version (same issue)
  • Update typescript (both globally and locally to 3.4.2)

Here is my tsconfig.json

{
  "compilerOptions": {
    "target": "es2018",
    "lib": [
      "es2018",
      "dom"
    ],
    "jsx": "react",
    "moduleResolution": "node",
    "allowJs": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "sourceMap": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "noImplicitReturns": true,
    "outDir": "../dist/src",
    "typeRoots": [
      "./types",
      "../node_modules/@types"
    ]
  }
}

Does this issue occur when all extensions are disabled?: Yes

And here's a screenshot of what I see when I hover over a variable in a .tsx file:

Screen Shot 2019-04-09 at 12 00 59 PM

The code in that screenshot should be covered in red squiggles because there's a bunch of type errors in it, but nothing is being picked up by VS Code. The "loading..." tooltip never goes away regardless of how long I leave the cursor.

And the VS Code output tab for TS doesn't show any issues:

[Info  - 12:00:47 PM] Using tsserver from: /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib
[Info  - 12:00:47 PM] Forking TSServer
[Info  - 12:00:47 PM] Started TSServer
@vscodebot vscodebot bot assigned mjbvz Apr 9, 2019
@vscodebot vscodebot bot added the typescript Typescript support issues label Apr 9, 2019
@ricsam
Copy link

ricsam commented Apr 9, 2019

Probably related to #71886

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 9, 2019

A few questions to help us investigate :

  1. Do you see this with all projects or just this one?
  2. Have you installed any @types packages in your project? We've pushed a few fixes to the styled components typings but you could still be working with older versions of them
  3. Does downgrading your workspace to use TypeScript 3.3 fix the issue?

/cc @RyanCavanaugh

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Apr 9, 2019
@jmeyers91
Copy link
Author

@mjbvz Updating @types/styled-components to 4.1.14 seems to have fixed the issue. I think @ricsam is right: this is related to #71886.

@mjbvz mjbvz added *duplicate Issue identified as a duplicate of another issue(s) and removed info-needed Issue requires more information from poster labels Apr 9, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators May 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

3 participants