angular / vscode-ng-language-service

Angular extension for Visual Studio Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Functions called with optional chaining are missing method coloration

Samuel-Therrien-Beslogic opened this issue Β· comments

🐞 bug report

Is this a regression?

No. Using method optional chaining didn't use to be possible.

Description

As title says, see example image:
image

Bug Type

What does this bug affect

  • Angular Language Service VSCode extension
  • Angular Language Service server

Reproduction

Steps to reproduce the behavior:

  1. Create a component with HTML template
  2. Add a public property bar: (() => void) | undefined
  3. Add to the template:
<div (foo)="bar()"></div>
<div (foo)="bar?.()"></div>
  1. See that bar?.() isn't using the method coloring (yellow in my case), but instead the default property coloring (blue in my case)

Expected behavior

Methods using optional chaining should be colored like methods not using optional chaining.

Logs

Log file gives us deep insight into the behavior and performance of the extension. If the issue is a performance
problem or an error occured, please provide the output of the log file below.

Set Angular Log level to verbose.



(I don't think logs are relevant here, but can activate and post if asked)

Screenshots

If applicable, add screenshots to help explain your problem.

See above

🌍 Your Environment

Angular Version:




     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / β–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 16.1.8
Node: 18.14.0
Package Manager: npm 9.4.2
OS: win32 x64

Angular: 16.1.9
... common, compiler-cli, core, forms, language-service   
... platform-browser, platform-browser-dynamic, router    

Package                         Version
--------------------------------------------------------- 
@angular-devkit/architect       0.1601.8
@angular-devkit/build-angular   16.1.8
@angular-devkit/core            16.2.8
@angular-devkit/schematics      16.2.8
@angular/cdk                    16.1.8
@angular/cli                    16.1.8
@angular/material               16.1.8
@schematics/angular             16.2.8
ng-packagr                      16.1.0
rxjs                            7.8.1
typescript                      4.9.5

Extension Version:




VSCode Version:



1.83.1 (user setup)

Operating System:



Windows 11 Version	10.0.22621 Build 22621

Extension options:



defaults

Anything else relevant?