Skip to content

[Salsa] load .js files from node packages #6670

Closed
@egamma

Description

@egamma

From @alexandrudima on January 27, 2016 14:48

Testing #2218

File structure:

  • node_modules
    • something2
      • main.js
      • package.json
  • consumer.js

node_modules/something2/main.js:

var f = function() {
    if (true || true) {
        return 5;
    }
    return '5';
}
exports.x = f();

node_modules/something2/package.json:

{
    "name": "something2",
    "version": "0.0.0",
    "main": "./main.js"
}

consumer.js

var s2 = require('something2');
s2.

Observe: x is not suggested for s2

Copied from original issue: microsoft/vscode#2459

Metadata

Metadata

Assignees

Labels

FixedA PR has been merged for this issueSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions