vscode icon indicating copy to clipboard operation
vscode copied to clipboard

【insiders.vscode.dev】Hold down ctrl and click the function name, two d.ts files with the same content but different paths will be displayed.

Open darrenweb opened this issue 1 year ago • 2 comments

Although the jQuery library has been installed locally via npm, if you hold down ctrl and click the function name, two d.ts files with the same content but different paths will be displayed.

Steps to Reproduce:

1.Create a jquery demo folder on my local computer,, 2.npm i @types/jquery 3.Open the URL https://insiders.vscode.dev/ through the latest Chrome browser, click open folder, and select the jquerydemo folder created in the first step above 4.Open the index.js file and holding down ctrl and clicking the ajax function name, the tow JQueryStatic.d.ts files with the same content but different paths will be displayed.

The paths of the two JQueryStatic.d.ts files displayed are as follows: 1.\frontend\node_modules@types\jquery\JQueryStatic.d.ts 2.\file\ts-nul-authority\frontend\node_modules@types\jquery\JQueryStatic.d.ts

The project already has the @types\jquery file, so I think there is no need to reload the https://registry.npmjs.org/@types/jquery/-/jquery-3.5.30.tgz library.

Thank you !

Please see the following figure:

CH}B3R@FB~NWLG3%)R@5DC9

darrenweb avatar Aug 28 '24 07:08 darrenweb

Can you try this out again in the latest VS Code builds. I think it may be fixed but want to confirm

mjbvz avatar Dec 10 '24 23:12 mjbvz

Hi @mjbvz

On insiders.vscode.dev, I confirmed that only one JQueryStatic.d.ts file is displayed. That’s fantastic!

By the way, why does vscode still need to request https://registry.npmjs.org/@types/jquery/-/jquery-3.5.30.tgz?

Thank you!

darrenweb avatar Dec 11 '24 07:12 darrenweb

Thanks for confirming. Will see if we can avoid downloading these files in the future too

mjbvz avatar Dec 16 '24 22:12 mjbvz