Skip to content

Angular decorators on static members should produce a diagnostic like ngtsc #547

Description

@Brooooooklyn

Parity gap found while reviewing #544 / #545.

Problem

Upstream reports a fatal diagnostic when certain Angular decorators appear on static members: @Input/@Output/@ViewChild/etc. on statics raise INCORRECTLY_DECLARED_ON_STATIC_MEMBER (packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts ~lines 1461, 1775). OXC silently processes or drops those members instead of erroring — e.g. @Input() static x compiles without a diagnostic.

Expected

Emit an equivalent diagnostic (or document the divergence) for Angular field/query decorators on static members. HostBinding/HostListener on statics are correctly ignored per #544.

References

  • Upstream: packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts (INCORRECTLY_DECLARED_ON_STATIC_MEMBER)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions