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

Uninstall ATA Installed Types Packages if they Are No Longer in the TypesRegistry #15164

Closed
mjbvz opened this issue Apr 12, 2017 · 7 comments
Closed
Labels
VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Apr 12, 2017

Repo

  1. @chrmarti has previously used require('vue') in a js file and ATA had installed @types/vue on their machine.
  2. He then recently created a new js file that uses require('vue')

Expected behavior:
The @types/vue package is no longer included in the types-registry since typings are now included in Vue itself. The old types should be removed from the ATA cache

Actual behavior:
The old @types/vue typings from the cache were used

@mhegazy
Copy link
Contributor

mhegazy commented May 6, 2017

Uninstall is nit the issue, module resolution should not include the old package.

Can you verify that node_modules/vue is available?

@chrmarti
Copy link

chrmarti commented Jun 7, 2017

Sorry, not sure anymore which of my explorations this was with. I see both have node_modules/vue, but only one of these has typings configured in its package.json.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 7, 2017

which one?

@chrmarti
Copy link

chrmarti commented Jun 7, 2017

The vue package without typings is version 1.0.28. The one with is 2.2.6.

~/Library/Caches/typescript/node_modules/@types/vue/index.d.ts says "Type definitions for vuejs 1.0.21". (In case this helps.)

@mhegazy
Copy link
Contributor

mhegazy commented Jun 7, 2017

which one you have locally in node_modules? @1.0.28 or @2.2.6?

@chrmarti
Copy link

chrmarti commented Jun 7, 2017

Tried to recreate the example without success, all the cases we thought problematic now work (TypeScript 2.3.4).

We found another bug, not sure if this is the same we originally saw and maybe misinterpreted. node_modules has vue 2.3.3.

Using:

// @ts-check
import Vue from 'vue';

/** @type {Vue.Compo} */
var opt = {
     
};

In the comment we get suggestions from the global namespace instead of Vue:
screen shot 2017-06-07 at 1 59 36 pm

@mhegazy
Copy link
Contributor

mhegazy commented Jun 8, 2017

Thanks for confirming. filed #16362 to track the second issue.

@mhegazy mhegazy closed this as completed Jun 8, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

3 participants