Closed
Description
From @zavr-1 on September 4, 2018 3:46
Issue Type: Bug
When a package loads some modules via another module, their will lack Intellisense and it is not possible to click through to their definition.
VS Code version: Code - Insiders 1.27.0-insider (346018a, 2018-08-24T05:12:36.061Z)
OS version: Darwin x64 15.6.0
System Info
Item | Value |
---|---|
CPUs | Intel(R) Core(TM)2 Duo CPU P7350 @ 2.00GHz (2 x 2000) |
GPU Status | 2d_canvas: unavailable_software checker_imaging: disabled_off flash_3d: unavailable_software flash_stage3d: unavailable_software flash_stage3d_baseline: unavailable_software gpu_compositing: unavailable_software multiple_raster_threads: disabled_off native_gpu_memory_buffers: unavailable_software rasterization: unavailable_software video_decode: unavailable_software video_encode: unavailable_software webgl: unavailable_off webgl2: unavailable_off |
Load (avg) | 7, 8, 6 |
Memory (System) | 8.00GB (0.16GB free) |
Process Argv | /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron -psn_0_24582 |
Screen Reader | no |
VM | 0% |
Extensions (2)
Extension | Author (truncated) | Version |
---|---|---|
vscode-eslint | dba | 1.5.0 |
code-spell-checker | str | 1.6.10 |
from file A
import { throws, equal } from 'zoroaster/assert'
where zoroaster/assert
is a proxy file (only has module.exports = require(./build/assert)
) to zoroaster/build/assert
which has:
let throws = require('assert-throws'); if (throws && throws.__esModule) throws = throws.default;
const $assert = require('assert');
const $assert_diff = require('assert-diff');
module.exports.assert = $assert
module.exports.equal = $assert.equal
module.exports.ok = $assert.ok
module.exports.deepEqual = $assert_diff.deepEqual
module.exports.throws = throws
//# sourceMappingURL=index.js.map
1. git clone https://github.com/artdecocode/vscode-require-types.git
2. code-insiders vscode-require-types
- open test/spec/default.js
- try use throws function, there will be no intellisense. try click through -- it will get to the parent package, but not any further than that.
- Uncomment
// import assertThrows from 'assert-throws'
line. Now,throws
works fine.
Whenever the proxy in form of zoroaster/assert
is removed in favour of zoroaster/build/assert
, then things work. I suppose I have to ln
the assert
rather than use module.exports = require('./build/assert')
but it's still a bug.
Copied from original issue: microsoft/vscode#57833