Skip to content

fix(parser): report TS2369 for parameter properties outside constructors - #26056

Open
MuntasirSZN wants to merge 1 commit into
oxc-project:mainfrom
MuntasirSZN:typescript
Open

fix(parser): report TS2369 for parameter properties outside constructors#26056
MuntasirSZN wants to merge 1 commit into
oxc-project:mainfrom
MuntasirSZN:typescript

Conversation

@MuntasirSZN

Copy link
Copy Markdown

TypeScript reports accessibility/readonly/override modifiers on
parameters of non-constructor functions as TS2369 ("A parameter property
is only allowed in a constructor implementation."), not TS1090. TS1090
remains for other modifiers (static, export, async, declare,
...).

Signed-off-by: MuntasirSZN muntasir.joypurhat@gmail.com

TypeScript reports accessibility/`readonly`/`override` modifiers on
parameters of non-constructor functions as TS2369 ("A parameter property
is only allowed in a constructor implementation."), not TS1090. TS1090
remains for other modifiers (`static`, `export`, `async`, `declare`,
...).

Signed-off-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
Comment thread tasks/coverage/snapshots/errors_typescript.snap
@camc314 camc314 added the A-parser Area - Parser label Aug 25, 2026
@MuntasirSZN
MuntasirSZN requested a review from camc314 August 25, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants