microsoft / microsoft/TypeScript
Enable node typings if file starts with node shebang
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
- VSCode Version:
- OS Version:
Steps to Reproduce:
Here is intellisense working correctly for a node script in a project:

Here is another screenshot showing the support not working for a global script that does have a project:

As node.js is a perfectly valid choice for scripting, and has no need for verbose project structures to work, the lack of support is a bug.
System Info
CPUs | Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz (4 x 2900)
-- | --
GPU Status | 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled
Load (avg) | 8, 6, 6
Memory (System) | 8.00GB (0.08GB free)
Process Argv |
Screen Reader | no
VM | 0%
Extension | Author (truncated) | Version
-- | -- | --
better-comments | aar | 2.0.5
interactive-scala | als | 1.2.1
better-toml | bun | 0.3.2
gitignore | cod | 0.6.0
bracket-pair-colorizer-2 | Coe | 0.1.3
scala | dal | 0.0.5
vsc-material-theme | Equ | 32.6.0
vsc-material-theme-icons | equ | 1.1.4
language-julia | jul | 0.15.32
crystal-ide | kof | 0.0.4
dotty | lam | 0.1.16
Lisp | mat | 0.1.10
vscode-docker | ms- | 1.2.0
python | ms- | 2020.5.78807
remote-containers | ms- | 0.117.1
remote-ssh | ms- | 0.51.0
remote-ssh-edit | ms- | 0.51.0
remote-wsl | ms- | 0.44.2
vscode-remote-extensionpack | ms- | 0.20.0
powershell | ms- | 2020.4.0
vscode-paste-image | mus | 1.0.4
gradle-language | nac | 0.2.3
java | red | 0.61.0
datetime | rid | 2.0.1
rust | rus | 0.7.8
scala | sca | 0.3.9
ayu | tea | 0.18.0
vscode-lldb | vad | 1.5.0
vscodeintellicode | Vis | 1.2.7
vscode-java-debug | vsc | 0.26.0
vscode-java-dependency | vsc | 0.10.1
vscode-java-pack | vsc | 0.9.1
vscode-java-test | vsc | 0.22.4
vscode-maven | vsc | 0.21.4
org-mode | vsc | 1.0.0
vim | vsc | 1.14.4
debug | web | 0.24.0
markdown-all-in-one | yzh | 2.8.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported difference between a project script and a global script that begins with a Node shebang, using the screenshots as the expected comparison. Trace how the TypeScript language service identifies Node scripts and confirm that the fix enables Node typings and matching IntelliSense for the global case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100