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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular langauge service not typing nested array objects #29291

Closed
DesHorsley opened this issue Mar 13, 2019 · 3 comments
Closed

Angular langauge service not typing nested array objects #29291

DesHorsley opened this issue Mar 13, 2019 · 3 comments
Assignees
Labels
area: language-service Issues related to Angular's VS Code language service feature Issue that requests a new feature freq2: medium
Milestone

Comments

@DesHorsley
Copy link

馃悶 bug report

Affected Package

The issue is caused by package @angular/language-service: 7.2.3

Description

When using nested arrays of strongly typed objects, in ngFor, the inner objects lose their strong typing and don't display errors on properties or suggest existing properties.

馃敩 Minimal Reproduction

To reproduce the issue, clone this repo: https://github.com/TylerHaigh/angular-language-server-nested-arrays

run npm install

And check out src/app/app.component.html, line 12 is correct and works, line 13 is a bug, does not show as an error, and there is no intellisense or warnings that the developer has a typo (missing the is in isCritical)

It seems like on line 10 at this point *ngFor="let test of accession.testSet" the language service gives up trying to type the objects and just assumes it's an any

Our hope was that we'd have full intellisense and error detection on the test object used after line 10

馃實 Your Environment

Angular Version:


Angular CLI: 1.7.4
Node: 8.12.0
OS: win32 x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic

@angular/cli: 1.7.4
@angular/language-service: 7.2.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.6.2
webpack: 3.11.0

This is evident in VS Code 1.31.1

@pkozlowski-opensource pkozlowski-opensource added the area: language-service Issues related to Angular's VS Code language service label Mar 14, 2019
@ngbot ngbot bot added this to the needsTriage milestone Mar 14, 2019
@kyliau kyliau self-assigned this May 14, 2019
@kyliau kyliau added freq2: medium severity2: inconvenient feature Issue that requests a new feature labels May 14, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog May 14, 2019
@kyliau
Copy link
Contributor

kyliau commented May 14, 2019

Broader issue related to this: Stricter type checking in Angular templates

@kyliau
Copy link
Contributor

kyliau commented Nov 13, 2019

This has been fixed in #33676

@kyliau kyliau closed this as completed Nov 13, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: language-service Issues related to Angular's VS Code language service feature Issue that requests a new feature freq2: medium
Projects
None yet
Development

No branches or pull requests

3 participants