René's URL Explorer Experiment


Title: Type definitions not exported correctly for vscode (intellisense not working on clean projects) · Issue #16879 · angular/angular-cli · GitHub

Open Graph Title: Type definitions not exported correctly for vscode (intellisense not working on clean projects) · Issue #16879 · angular/angular-cli

X Title: Type definitions not exported correctly for vscode (intellisense not working on clean projects) · Issue #16879 · angular/angular-cli

Description: I tried searching everywhere for this issue but actually very few people noticed it (to my surprise). The only thing I could find is this stackoverlow question 🐞 bug report Affected Package The issue is caused by package @angular/.... Is...

Open Graph Description: I tried searching everywhere for this issue but actually very few people noticed it (to my surprise). The only thing I could find is this stackoverlow question 🐞 bug report Affected Package The iss...

X Description: I tried searching everywhere for this issue but actually very few people noticed it (to my surprise). The only thing I could find is this stackoverlow question 🐞 bug report Affected Package The iss...

Opengraph URL: https://github.com/angular/angular-cli/issues/16879

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type definitions not exported correctly for vscode (intellisense not working on clean projects)","articleBody":"I tried searching everywhere for this issue but actually very few people noticed it (to my surprise).\r\nThe only thing I could find is this [stackoverlow question](https://stackoverflow.com/questions/55082763/vscode-intellisense-doesnt-suggest-angular-modules-until-imported-manually-in-t)\r\n\r\n# 🐞 bug report\r\n\r\n### Affected Package\r\n\u003c!-- Can you pin-point one or more @angular/* packages as the source of the bug? -->\r\n\u003c!-- ✍️edit: --> The issue is caused by package @angular/....\r\n\r\n\r\n### Is this a regression?\r\n\r\nI don't think so, as far as I can recall IntelliSense on vscode never worked but it's a very subtle issue (for this reason I'm not sure when this started or if it has always been like this). \r\nIn fact, just a few people noticed this behavior because vscode seems to be smart enough to remember and understand after the first manual import\r\n\r\n### Description\r\n\r\nVscode has two ways to provide hints through IntelliSense to the developer (you can read it [here](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)):\r\n\r\nIt can either look for the node_modules/@types folder or get the type definition file in the package.json, under the \"typings\" or \"types\" key (the first way is more suited for non ts libraries/frameworks).\r\n\r\nYou enforce the first one through your cli when calling `ng new my-app` in tsconfig.json we find:\r\n\r\n```\r\n\"typeRoots\": [\r\n  \"node_modules/@types\"\r\n],\r\n```\r\n\r\nbut in all the new angular projects generated by the cli, the @types folder is missing the angular types:\r\n\r\n![screen 1](https://user-images.githubusercontent.com/9303791/74047960-7f3e4000-49d1-11ea-8a34-33ed4400202c.png)\r\n\r\nRelating this behavior to how React handles this, for example, isn't ok. With React we correctly get suggestions and the type definitions file appear correctly in the @types folder:\r\n\r\n![image](https://user-images.githubusercontent.com/9303791/74048100-d7754200-49d1-11ea-85f1-f2bbdf43c64b.png)\r\n\r\nSo, knowing that maybe pointing typeRoots to the node_modules/@angular folder would solve the problem, **an attempt I've done** is to include it there.\r\n**Problem solved partially**, why? Because then all the routing stuff **were** importable, but **still not** the http stuff.\r\n\r\nHow come?\r\nBecause vscode is looking at your package.json files available in the node_modules/@angular folder, with the `router`, everything's ok:\r\n\r\n![image](https://user-images.githubusercontent.com/9303791/74048739-16f05e00-49d3-11ea-82cf-5f414f9e19c9.png)\r\n\r\nbut not with the `common` package.json:\r\n\r\n![image](https://user-images.githubusercontent.com/9303791/74048890-5c149000-49d3-11ea-9f55-e06a019a70a1.png)\r\n\r\nsince the common.d.ts file has no reference for many stuff like, for example, the httpclient module:\r\n\r\n![image](https://user-images.githubusercontent.com/9303791/74048960-7c444f00-49d3-11ea-9c24-ec41a87e4cde.png)\r\n\r\n## 🔬 Minimal Reproduction\r\nSee yourself, open stackblitz with a blank project: https://stackblitz.com/fork/angular\r\nand write HttpC (press ctrl+space too that is usually the command to make the hints show up) and see that no correct suggestion is shown.\r\n\r\n![screen 2](https://user-images.githubusercontent.com/9303791/74047746-2078c680-49d1-11ea-9d40-81ebfef631a4.png)\r\n\r\n\r\n**Anything else relevant?**\r\n\r\nI will put up a PR exporting all the needed definitions directly from the common.d.ts file and please, edit your cli to generate the tsconfig.json including node_modules/@angular\r\n\r\n## 🌍  Your Environment\r\n\r\n**Angular Version:**\r\n```\r\nAngular CLI: 9.0.1\r\nNode: 12.13.1\r\nOS: win32 x64\r\n\r\nAngular: 9.0.0\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\nIvy Workspace: Yes\r\n\r\nPackage                           Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect         0.900.1\r\n@angular-devkit/build-angular     0.900.1\r\n@angular-devkit/build-optimizer   0.900.1\r\n@angular-devkit/build-webpack     0.900.1\r\n@angular-devkit/core              9.0.1\r\n@angular-devkit/schematics        9.0.1\r\n@angular/cli                      9.0.1\r\n@ngtools/webpack                  9.0.1\r\n@schematics/angular               9.0.1\r\n@schematics/update                0.900.1\r\nrxjs                              6.5.4\r\ntypescript                        3.7.5\r\nwebpack                           4.41.2\r\n```","author":{"url":"https://github.com/giacomocerquone","@type":"Person","name":"giacomocerquone"},"datePublished":"2020-02-07T17:00:13Z","url":"https://github.com/angular/angular-cli/issues/16879"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3419b9de-5bcb-f26f-f807-59d6b4e526bd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8064:31B4CC:977FE1:C951C1:6B00E269
html-safe-nonce741235d25699d9f224f1f1a24509377fbcac1c833e590f55f5199a00d9ebc25c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDY0OjMxQjRDQzo5NzdGRTE6Qzk1MUMxOjZCMDBFMjY5IiwidmlzaXRvcl9pZCI6IjcyMjE5MTc4NDk5NDQ2NDYyNDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac166ab3feb8820b4d6ca11e246c977ae40a0fd9728fd5e82b28ced06140c29875
hovercard-subject-tagissue:561814548
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/16879/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6285acb42c7275cf7e41e345012c9f3af449a23173ced9aa001050ba41129d86/angular/angular-cli/issues/16879
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6285acb42c7275cf7e41e345012c9f3af449a23173ced9aa001050ba41129d86/angular/angular-cli/issues/16879
og:image:altI tried searching everywhere for this issue but actually very few people noticed it (to my surprise). The only thing I could find is this stackoverlow question 🐞 bug report Affected Package The iss...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegiacomocerquone
hostnamegithub.com
expected-hostnamegithub.com
None27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14
turbo-cache-controlno-preview
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release624179fb8b88d26ba5bba08894eb60a1c5a1d93d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular-cli/issues/16879#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F16879
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F16879
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/issues/16879
Reloadhttps://github.com/angular/angular-cli/issues/16879
Reloadhttps://github.com/angular/angular-cli/issues/16879
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues198 (198)https://github.com/angular/angular-cli/issues
Pull requests23 (23)https://github.com/angular/angular-cli/pulls
Actionshttps://github.com/angular/angular-cli/actions
Security and quality8 (8)https://github.com/angular/angular-cli/security
Insightshttps://github.com/angular/angular-cli/insights
https://github.com/angular/angular-cli
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/16879
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/16879
Type definitions not exported correctly for vscode (intellisense not working on clean projects)https://github.com/angular/angular-cli/issues/16879#top
https://github.com/kyliau
https://github.com/alan-agius4
area: etc/mischttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20etc%2Fmisc%22
needsTriagehttps://github.com/angular/angular-cli/milestone/11
https://github.com/giacomocerquone
giacomocerquonehttps://github.com/giacomocerquone
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issue-561814548
stackoverlow questionhttps://stackoverflow.com/questions/55082763/vscode-intellisense-doesnt-suggest-angular-modules-until-imported-manually-in-t
herehttps://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html
@typeshttps://github.com/types
@typeshttps://github.com/types
https://user-images.githubusercontent.com/9303791/74047960-7f3e4000-49d1-11ea-8a34-33ed4400202c.png
@typeshttps://github.com/types
https://user-images.githubusercontent.com/9303791/74048100-d7754200-49d1-11ea-85f1-f2bbdf43c64b.png
@angularhttps://github.com/angular
@angularhttps://github.com/angular
https://user-images.githubusercontent.com/9303791/74048739-16f05e00-49d3-11ea-82cf-5f414f9e19c9.png
https://user-images.githubusercontent.com/9303791/74048890-5c149000-49d3-11ea-9f55-e06a019a70a1.png
https://user-images.githubusercontent.com/9303791/74048960-7c444f00-49d3-11ea-9c24-ec41a87e4cde.png
https://stackblitz.com/fork/angularhttps://stackblitz.com/fork/angular
https://user-images.githubusercontent.com/9303791/74047746-2078c680-49d1-11ea-9d40-81ebfef631a4.png
@angularhttps://github.com/angular
Nexthttps://github.com/angular/angular-cli/issues/16879?timeline_page=1
AndrewKushnirhttps://github.com/AndrewKushnir
kyliauhttps://github.com/kyliau
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#event-3018470615
kyliauhttps://github.com/kyliau
angular/angularhttps://github.com/angular/angular
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#event-3018752638
https://github.com/giacomocerquone
giacomocerquonehttps://github.com/giacomocerquone
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-583556571
@AndrewKushnirhttps://github.com/AndrewKushnir
https://github.com/alan-agius4
alan-agius4https://github.com/alan-agius4
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-583567718
alan-agius4https://github.com/alan-agius4
needs: investigationRequires some digging to determine if action is neededhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22needs%3A%20investigation%22
area: etc/mischttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20etc%2Fmisc%22
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#event-3018841759
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular-cli/milestone/11
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#event-3018842184
https://github.com/kyliau
kyliauhttps://github.com/kyliau
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-583586629
@alan-agius4https://github.com/alan-agius4
handbookhttps://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types
https://github.com/kyliau
kyliauhttps://github.com/kyliau
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-583588773
https://github.com/alan-agius4
alan-agius4https://github.com/alan-agius4
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-583592701
@kyliauhttps://github.com/kyliau
https://github.com/kyliau
kyliauhttps://github.com/kyliau
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-583595371
@alan-agius4https://github.com/alan-agius4
https://github.com/giacomocerquone
giacomocerquonehttps://github.com/giacomocerquone
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-583602797
@angularhttps://github.com/angular
https://github.com/giacomocerquone
giacomocerquonehttps://github.com/giacomocerquone
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-583603828
@kyliauhttps://github.com/kyliau
https://github.com/kyliau
kyliauhttps://github.com/kyliau
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-583609781
https://github.com/clydin
clydinhttps://github.com/clydin
on Feb 7, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-583623996
https://github.com/AJHanekom
AJHanekomhttps://github.com/AJHanekom
on May 27, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-634630049
https://github.com/maximedasilva
maximedasilvahttps://github.com/maximedasilva
on May 27, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-634670757
Full page herehttps://www.typescriptlang.org/tsconfig#types
kyliauhttps://github.com/kyliau
triage #1https://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22triage%20%231%22
needs: discussionOn the agenda for team meeting to determine next stepshttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22needs%3A%20discussion%22
needs: investigationRequires some digging to determine if action is neededhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22needs%3A%20investigation%22
on May 29, 2020https://github.com/angular/angular-cli/issues/16879#event-3385124963
https://github.com/kyliau
kyliauhttps://github.com/kyliau
on Jun 5, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-639645564
microsoft/TypeScript#38923https://github.com/microsoft/TypeScript/pull/38923
kyliauhttps://github.com/kyliau
needs: discussionOn the agenda for team meeting to determine next stepshttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22needs%3A%20discussion%22
on Jun 5, 2020https://github.com/angular/angular-cli/issues/16879#event-3412361494
alan-agius4https://github.com/alan-agius4
on Jul 14, 2020https://github.com/angular/angular-cli/issues/16879#event-3542869658
https://github.com/panchoggit
panchoggithttps://github.com/panchoggit
on Aug 24, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-679319086
https://github.com/panchoggit
panchoggithttps://github.com/panchoggit
on Aug 24, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-679319432
Full page herehttps://www.typescriptlang.org/tsconfig#types
https://github.com/alan-agius4
alan-agius4https://github.com/alan-agius4
on Aug 26, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-680681566
alan-agius4https://github.com/alan-agius4
completedhttps://github.com/angular/angular-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 26, 2020https://github.com/angular/angular-cli/issues/16879#event-3693162134
https://github.com/panchoggit
panchoggithttps://github.com/panchoggit
on Aug 31, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-683898655
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Oct 1, 2020https://github.com/angular/angular-cli/issues/16879#issuecomment-701968188
automatic conversation locking policyhttps://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Oct 1, 2020https://github.com/angular/angular-cli/issues/16879#event-3828118819
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/16879
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/16879
alan-agius4https://github.com/alan-agius4
kyliauhttps://github.com/kyliau
area: etc/mischttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20etc%2Fmisc%22
needsTriageNo due datehttps://github.com/angular/angular-cli/milestone/11
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.