Skip to content

Bug Report: ɵassertType false positive error in Angular Language Service (newest VS Code extension) #63046

@m-obti

Description

@m-obti

Which @angular/* package(s) are the source of the bug?

core, language-service

Is this a regression?

Yes

Description

After the latest update of the Angular Language Service VS Code extension (today), a previously working template now throws the following error:

Property 'ɵassertType' does not exist on type 'typeof import(".../node_modules/@angular/core/index")'.

This occurs on (keydown)="..." bindings inside a template of a component that uses ReactiveFormsModule.

Example:

<input
  matInput
  formControlName="zaehlerstand"
  [placeholder]="getPlaceholderValue()"
  (keydown.enter)="handleEnter($event)"
  (keydown)="forceValidation()"
/>

Downgrading the extension to the previous version (~3 weeks ago) immediately resolves the issue without any code changes.

Disabling strict template type checking ("strictTemplates": false in tsconfig.json) also works around the issue, but this is not ideal.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

Property 'ɵassertType' does not exist on type 'typeof import(".../node_modules/@angular/core/index")'.

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 19.2.14
Node: 20.11.1
Package Manager: npm 10.2.4
OS: win32 x64

Angular: 19.2.14
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1902.14
@angular-devkit/build-angular      19.2.14
@angular-devkit/core               19.2.14
@angular-devkit/schematics         19.2.14
@angular/cdk                       19.2.18
@angular/material                  19.2.18
@angular/material-moment-adapter   19.2.18
@schematics/angular                19.2.14
rxjs                               7.8.2
typescript                         5.8.3
zone.js                            0.15.1

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: language-serviceIssues related to Angular's VS Code language service

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions