Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript language service does not autocomplete types from referenced projects #78728

Closed
sunniejai opened this issue Aug 8, 2019 · 1 comment
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@sunniejai
Copy link

sunniejai commented Aug 8, 2019

VSCode Version: 1.37.0 (user setup)
OS: Windows 10.0.17763
Typescript Version: 3.5.2

Currently if you setup a monorepo with two typescript projects
/foo
index.ts
/bar
index.ts

and bar references foo. using the references feature in typescript 3.

Here's a sample tsconfig.json

  "compilerOptions": {
       "target": "es2016",
       "module": "commonjs",
       "moduleResolution": "node",
       "declaration": true,
       "declarationMap": true,
       "sourceMap": true,
       "composite": true
  },
  "references": [
    { "path": "../foo" }
  ]
}

If in /foo/index.ts you export a function/const named blah, intellisense will not provide auto complete in /bar/index.ts to auto import that symbol. This happens even if you've already compiled /foo so that all the declaration files are already there.

It would be nice if VS code can show autocomplete for those symbols exported in the referenced projects, and auto import them as well.

This might help with giving a workaround to this issue as well because you may be able set it up to work locally on different packages without using symlinks and instead using the paths config in tsconfig.json instead? #25312

It could also be nicer if the references config had a name field along with path to setup the alias (you could probably just do it with paths) though

@vscodebot vscodebot bot added the new release label Aug 8, 2019
@sunniejai sunniejai changed the title Typescvript language service does not autocomplete types from referenced projects Typescript language service does not autocomplete types from referenced projects Aug 8, 2019
@vscodebot vscodebot bot removed the new release label Aug 13, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Aug 13, 2019

Duplicate of microsoft/TypeScript#26913

Please share any feedback upstream on TypeScript

@mjbvz mjbvz closed this as completed Aug 13, 2019
@mjbvz mjbvz added *duplicate Issue identified as a duplicate of another issue(s) typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Aug 13, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants