Skip to content

fix(parser): reject return types on constructor overloads - #26523

Merged
graphite-app[bot] merged 1 commit into
mainfrom
codex/fix-constructor-return-annotations
Sep 10, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
codex/fix-constructor-return-annotations

Conversation

@camc314

@camc314 camc314 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Constructor overloads and ambient signatures previously bypassed the return type check because it required a body. Reject their return annotations with TS1093, matching constructor implementations.

Highlight only the return type itself, excluding the colon and preceding whitespace.

Copilot AI lite review requested due to automatic review settings September 10, 2026 10:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T10:03:52.132409Z 9ef182a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added A-parser Area - Parser A-linter Area - Linter labels Sep 10, 2026
@codspeed

codspeed Bot commented Sep 10, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 67 untouched benchmarks
⏩ 14 skipped benchmarks1


Comparing codex/fix-constructor-return-annotations (89103f7) with main (586f27a)

Open in CodSpeed

Footnotes

  1. 14 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Sep 10, 2026

camc314 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

Constructor overloads and ambient signatures previously bypassed the return type check because it required a body. Reject their return annotations with TS1093, matching constructor implementations.

Highlight only the return type itself, excluding the colon and preceding whitespace.
@graphite-app
graphite-app Bot force-pushed the codex/fix-constructor-return-annotations branch from 89103f7 to 31508b1 Compare September 10, 2026 10:10
@graphite-app
graphite-app Bot merged commit 31508b1 into main Sep 10, 2026
34 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Sep 10, 2026
@graphite-app
graphite-app Bot deleted the codex/fix-constructor-return-annotations branch September 10, 2026 10:15
graphite-app Bot pushed a commit that referenced this pull request Sep 14, 2026
### 🚀 Features

- ca649e0 ecma: Define math constants as known globals and resolve their types (#26585) (Armano)
- 9ef028c codegen: Add `ascii_only` option (#25994) (Samuel Attard)
- 80a76a0 minifier: Negate binary comparison for `typeof x < 'u'` (#26367) (Armano)

### 🐛 Bug Fixes

- 8ca76da parser: Reject `accessor` modifiers on methods (#26617) (camc314)
- 1916f31 parser: Reject `readonly` modifier on constructors (#26612) (camc314)
- 1c42008 parser: Handle escaped let in for loops (#26583) (camc314)
- d21d5cf parser: Recognize annotated empty arrows in conditionals (#26537) (camc314)
- d7713ad parser: Classify Unicode line breaks in block comments (#26536) (camc314)
- 75cd919 transformer: Preserve receivers in private optional chains (#26535) (camc314)
- b32d25d parser: Reject escaped import-phase keywords (#26534) (camc314)
- 47b8311 parser: Recognize contextual binding names in type lookaheads (#26532) (camc314)
- d6b6705 parser: Require arrow separator in TypeScript function types (#26529) (camc314)
- e98beef parser: Disambiguate await using in for initializers (#26527) (camc314)
- 92afee6 parser: Allow parenthesized JSX comma expressions with preserve_parens=false (#26524) (camc314)
- 31508b1 parser: Reject return types on constructor overloads (#26523) (camc314)
- a091fc4 parser: Validate await context for await using declarations (#26495) (camc314)
- 5501e86 parser: Disallow in expressions in using for-loop initializers (#26490) (camc314)
- c8e5fa7 parser: Allow escaped type names in import and export specifiers (#26487) (camc314)
- 2dcee2f parser: Reject async modifiers on class fields (#26486) (camc314)
- 973d58e parser: Require comma after TypeScript this parameter (#26480) (camc314)
- 32d00c5 codegen: Preserve instantiation expression precedence (#26424) (camc314)
- cfa47ab parser: Allow `in` expressions in class static blocks (#26423) (camc314)
- 5986187 packages/codegen: Preserve private-in right operand precedence (#26420) (camc314)
- f8e6c6c packages/codegen: Preserve in restriction through yield arguments (#26421) (camc314)
- d61e3bf parser: Validate TS named tuple rest elements (#26419) (camc314)
- ae6c386 codegen: Preserve in restriction through yield arguments (#26413) (camc314)
- 42ac916 codegen: Preserve private-in right operand precedence (#26411) (camc314)
- 10521b2 parser: Allow escaped type default import bindings (#26409) (camc314)
- 72cb5e3 parser: Reject rest parameters in getters (#26400) (camc314)
- 6e15ad5 packages/codegen: Print matching quoted import names as identifiers (#26404) (camc314)
- bbbb4bc packages/codegen: Preserve private-in left operand precedence (#26403) (camc314)
- a111b5b packages/codegen: Print accessibility modifiers before abstract (#26402) (camc314)
- 4e76602 parser: Allow `in` in arrow block bodies within `for` initializers (#26395) (camc314)
- b20fc19 parser: Reject partially parenthesized mixed coalesce expressions (#26394) (camc314)

### ⚡ Performance

- 1f902a6 isolated_declarations: Key scope maps by `Ident` (#26380) (Dunqing)
- a242469 minfiier: Reduce allocs when creating indirect access (#26601) (Armano)
- 5b4787f minifier: Update chain expressions in place (#26544) (Armano)
- 0bc1661 minifier: Try merging before creating new expression statements (#26556) (Armano)
- c78d707 minifier: Process newly created stmt in handle_if_statement (#26541) (Armano)
- 029c84b minfier: Update expressions in place when substituting alternate syntax (#26460) (Armano)
- d198982 codegen: Outline postfix source mapping work (#26450) (camc314)
- 53f006e ecmascript: Format small integer literals with itoa (#26446) (camc314)
- 8bfb8c0 codegen: Avoid duplicate sourcemap name lookups (#26441) (camc314)

### 📚 Documentation

- 38533ac ast: Move type annotation span comment to span field (#26522) (camc314)
graphite-app Bot pushed a commit that referenced this pull request Sep 14, 2026
# Oxlint
### 🚀 Features

- afe950d linter/react: Update lint rules to accomodate changes in React 19.3 (#26571) (Connor Shea)

### 🐛 Bug Fixes

- fb87ed7 linter/unicorn/prefer-array-flat-map: Report `.filter().flatMap()` chains (#26626) (camc314)
- 336b654 linter/unicorn/prefer-at: Report single-character substring calls (#26623) (camc314)
- a5bba6d linter/eslint/no-unused-vars: Respect rest params after-used option (#26579) (Bartok)
- c1470a2 linter/eslint/no-unused-vars: Preserve ambient implicit exports (#26582) (Dex Hunter)
- 9a469d2 linter/unicorn/prefer-global-this: Preserve window event method references (#26611) (Dex Hunter)
- aaff758 linter/unicorn/prefer-default-parameters: Report violation for `??=` and `||=` (#26607) (Bartok)
- 2bed25a linter/unicorn/prefer-array-flat: Skip plain `concat` normalization (#26604) (im10furry)
- 72bc7f2 oxlint: Replace backlashes path for "no js runtime" diagnostic (#26599) (Sysix)
- 1aa5ec1 linter/typescript/prefer-for-of: Handle computed collections (#26584) (camc314)
- 1e90019 linter/typescript: Mark `no-unnecessary-type-parameters` and `prefer-find` suggestions as implemented (#26586) (Mikhail Baev)
- 4231536 linter: Compare label text in runtime optimization assertion (#26526) (camc314)
- 36d5534 linter: Include file path in diagnostic assertion (#26525) (camc314)
- 31508b1 parser: Reject return types on constructor overloads (#26523) (camc314)

### ⚡ Performance

- 1d681b0 linter/react/jsx-pascal-case: Avoid temporary name segment vector (#26531) (camc314)
- 2ad7d49 linter/promise/catch-or-return: Avoid temporary formatting vectors (#26505) (camc314)
- 203235b linter/jsx-a11y/no-static-element-interactions: Avoid role vector (#26504) (camc314)
- 2e95167 linter/jsx-a11y/anchor-is-valid: Avoid temporary attribute vector (#26501) (camc314)
- deafdba linter/react/exhaustive-deps: Avoid temporary dependency vector (#26502) (camc314)
- 4f1627f linter/oxc/branches-sharing-code: Compute deletion spans lazily (#26500) (camc314)
- c068fd2 linter/react/jsx-curly-brace-presence: Avoid newline position allocation (#26499) (camc314)
- ed4357c linter/eslint/no-restricted-properties: Skip empty configurations (#26497) (camc314)
- 92e41b7 linter/oxc/no-barrel-file: Iterate module requests directly (#26498) (camc314)
- 5255ee3 linter/unicorn/prefer-single-call: Avoid temporary argument vector (#26494) (camc314)
- 96ef365 linter/unicorn/prefer-includes: Reduce suggestion allocations (#26492) (camc314)
- a71fd7f linter/unicorn/no-new-buffer: Avoid temporary argument vector (#26491) (camc314)
- 11085e7 linter/jsdoc/require-yields: Short-circuit JSDoc checks (#26488) (camc314)
- 9b1aff8 linter/unicorn/no-useless-undefined: Skip calls without trailing undefined (#26481) (camc314)
- 1e5d5d7 linter/eslint/no-unused-vars: Skip absent global declaration checks (#26457) (camc314)
- 403f899 linter/eslint/no-undef: Check globals once per unresolved name (#26456) (camc314)
- 118adb0 linter/eslint/no-restricted-imports: Avoid redundant import scans (#26455) (camc314)
- ab848f2 linter/eslint/no-useless-assignment: Skip tracking exported symbols (#26449) (camc314)
- 1b6e409 linter/unicorn/prefer-object-from-entries: Avoid allocating configured paths (#26448) (camc314)
- 2206875 linter/eslint/new-cap: Avoid unnecessary callee name allocations (#26447) (camc314)

### 📚 Documentation

- b927e0a linter/typescript/await-thenable: Add missing lang for markdown doc comment (#26438) (Ari Perkkiö)
# Oxfmt
### 🚀 Features

- 586f27a formatter_core: Add `prefix_align` builder and `Tag::(Start|End)Prefix` (#26520) (leaysgur)
- dc45cc3 formatter_test: Test Prettier dynamic snippet tests (#26469) (leaysgur)

### 🐛 Bug Fixes

- d7e0c82 formatter: Keep an enum member's trailing suppress comment (#26549) (leaysgur)
- d2fe01e formatter: Unify suppress comment behavior (#26547) (leaysgur)
- d35d89f oxfmt: Skip shutdown delay on fixed Node 24 releases (#26518) (Pablo García)
- aef8b4a formatter_css: Handle less-test-suites failures (#26513) (leaysgur)
- 9dbddca formatter: Keep group flat for own-line comment in JSX (#26475) (leaysgur)
- d226e6f formatter_yaml: Bump oxc-yaml-parser to 0.0.6 (#26472) (leaysgur)
- 8b41fc0 formatter_yaml: Clamp `tab_width: 0` to 1 to keep semantics (#26471) (leaysgur)
- dea2ba0 formatter_core: Do not panic with align(0) (#26468) (leaysgur)
- bf1d3f6 formatter: Check `this_param` for simple parameters test (#26474) (leaysgur)
- 33cdc84 formatter: Keep cast-target assignment and commented parameter patterns (#26429) (leaysgur)
- 876fbe3 oxfmt: Expand `Fill` parts in tsx-in-vue (#26427) (leaysgur)

### 📚 Documentation

- 66fda4f formatter: Update AGENTS.md comment handling (#26551) (leaysgur)
- 41abcba formatter: Note why jsx-test-suite snippets stay off (#26515) (leaysgur)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter A-parser Area - Parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Sponsor
SponsoredKunjungi sekarang
Promo