When using Angular’s ChangeDetectionStrategy inside a component decorator, the Angular LSP incorrectly flags the property as invalid.
Example code:
@Component({
selector: 'app-example-comp',
templateUrl: './example.component.html',
styleUrl: './example.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ExampleComponent {}
Error shown:
changeDetection must be a member of ChangeDetectionStrategy enum from @angular/core
Value is of type 'ChangeDetectionStrategy$1'. (-991010)
LSP request/response log:
Environment:
- Angular LSP version:
v0.0.4
- Zed version:
Zed 0.200.5 – /usr/lib/zed/zed-editor
- Angular version:
19.2.15
Expected behavior:
The LSP should recognize ChangeDetectionStrategy.OnPush as a valid enum member without raising an error.
Actual behavior:
The LSP incorrectly reports that the value is not a valid member, blocking proper diagnostics.