Trigger Node type acquisition on matching shebang #46278
Copy link
Copy link
Open
Labels
Domain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyExperience EnhancementNoncontroversial enhancementsNoncontroversial enhancementsSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
Version: 1.61.0
Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea
Date: 2021-10-07T18:11:02.929Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.11.0-37-generic
Steps to Reproduce:
npm init -y- set
"type": "module" - creating new
index.jsfile - writting
fsdoesn't sugget to import fs, so it doesn't addimport fs from 'fs'line.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Domain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyExperience EnhancementNoncontroversial enhancementsNoncontroversial enhancementsSuggestionAn idea for TypeScriptAn idea for TypeScript
Activity
mackelito commentedon Oct 29, 2021
Same issue here...
andrewbranch commentedon Oct 29, 2021
Duplicate of #46521. We don't assume you want to reference Node typings until you do it once in a project. You can either install
@types/nodeor write your first import of a Node builtin by hand.Mlocik97 commentedon Oct 29, 2021
Can't we automatically start intellisense for node, if env is set to node? I mean when files contain
? It already should tell, content of file contain node code, and activate intellisense for it?
andrewbranch commentedon Oct 29, 2021
Yeah, that's a good suggestion.
[-][JS] Autoimport doesn't work.[/-][+]Trigger Node type acquisition on matching shebang[/+]