Skip to content

Code editing sequence matters for typing acquisition #11744

Closed
@kieferrm

Description

@kieferrm

OS Version: macOS
TypeScript Version: typescript@^2.0.6-insiders.20161014 using vscode 1.7 insiders

Note: "typescript.experimentalAutomaticTypeAcquisition": true must be in your vscode user settings.

Steps to Reproduce

    1. clear ~/Library/Application Support/Microsoft/TypeScript/node_modules/@types
    1. start vscode on an workspace with the following two files:
      package.json
{
    "name": "test",
    "version": "0.0.1",
    "dependencies": {
        "express" : "4.14.0"
    },
    "engines" : {
        "node" : "6.7.0",
        "npm" : "3.10.x"
    }
}

test.js

var fs = require('fs');
fs.
    1. open test.js in editor
    1. append to the file:
var calendar = require('node-calendar');
calendar.
    1. invoke inteliisense; no proposals
    1. open package.json in the editor
    1. add the following dependency
        "node-calendar" : "0.1.4"
    1. go back to test.js
    1. place caret behind calendar. and invoke intellisense using Cmd+Space

Expected behavior:
Intellisense proposals for the node-calendar module are presented

Actual behavior:
No node-calendar specific proposals are shown. ~/Library/Application Support/Microsoft/TypeScript/node_modules/@types remains unchanged.

    1. restart vscode
    1. repeat steps 8. and 9.

-> Intellisense proposals for the node-calendar module are presented

Note: When first adding the dependency for node-calendar in package.json and then adding the require in test.js auto acquisition and intellisense work as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions