Skip to content

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented May 22, 2025

The same as class, if the method's return type cannot be inferred, it should report an error.

const A = {
  method() {   
//^^^^^^^ Method must have an explicit return type annotation with --isolatedDeclarations.
  }
}

Copy link
Member Author

Dunqing commented May 22, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented May 22, 2025

CodSpeed Instrumentation Performance Report

Merging #11230 will not alter performance

Comparing 05-22-feat_isolated-declarations_report_an_error_for_object_methods_whose_return_type_cannot_be_inferred (123e63c) with 05-22-fix_isolated-declarations_incorrect_type_of_object_property_accessor (9ec8500)

Summary

✅ 8 untouched benchmarks
🆕 30 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 codegen[RadixUIAdoptionSection.jsx] N/A 132.2 µs N/A
🆕 codegen[binder.ts] N/A 4.8 ms N/A
🆕 codegen[cal.com.tsx] N/A 38.8 ms N/A
🆕 codegen[react.development.js] N/A 2.2 ms N/A
🆕 formatter[RadixUIAdoptionSection.jsx] N/A 300.5 µs N/A
🆕 formatter[binder.ts] N/A 18.8 ms N/A
🆕 formatter[cal.com.tsx] N/A 142.8 ms N/A
🆕 formatter[react.development.js] N/A 9.2 ms N/A
🆕 linter[RadixUIAdoptionSection.jsx] N/A 2.8 ms N/A
🆕 linter[binder.ts] N/A 149.1 ms N/A
🆕 linter[cal.com.tsx] N/A 1.3 s N/A
🆕 linter[react.development.js] N/A 54.7 ms N/A
🆕 mangler[RadixUIAdoptionSection.jsx] N/A 14.4 µs N/A
🆕 mangler[binder.ts] N/A 796.9 µs N/A
🆕 mangler[cal.com.tsx] N/A 3 ms N/A
🆕 mangler[react.development.js] N/A 282.8 µs N/A
🆕 minifier[RadixUIAdoptionSection.jsx] N/A 66.3 µs N/A
🆕 minifier[binder.ts] N/A 3.5 ms N/A
🆕 minifier[cal.com.tsx] N/A 23.4 ms N/A
🆕 minifier[react.development.js] N/A 1.8 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@Dunqing Dunqing force-pushed the 05-22-fix_isolated-declarations_incorrect_type_of_object_property_accessor branch from 57cd5a9 to c4b71d8 Compare May 22, 2025 07:50
@Dunqing Dunqing force-pushed the 05-22-feat_isolated-declarations_report_an_error_for_object_methods_whose_return_type_cannot_be_inferred branch 2 times, most recently from 3198d49 to f8622ef Compare May 22, 2025 23:43
@Dunqing Dunqing force-pushed the 05-22-fix_isolated-declarations_incorrect_type_of_object_property_accessor branch from c4b71d8 to 109dcf6 Compare May 22, 2025 23:43
@github-actions github-actions bot added A-isolated-declarations Isolated Declarations C-enhancement Category - New feature or request labels May 22, 2025
@Dunqing Dunqing marked this pull request as ready for review May 22, 2025 23:47
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label May 23, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented May 23, 2025

Merge activity

… return type cannot be inferred (#11230)

The same as `class`, if the method's return type cannot be inferred, it should report an error.

```ts
const A = {
  method() {
//^^^^^^^ Method must have an explicit return type annotation with --isolatedDeclarations.
  }
}
```
@graphite-app graphite-app bot force-pushed the 05-22-fix_isolated-declarations_incorrect_type_of_object_property_accessor branch from 109dcf6 to 9ec8500 Compare May 23, 2025 11:51
@graphite-app graphite-app bot force-pushed the 05-22-feat_isolated-declarations_report_an_error_for_object_methods_whose_return_type_cannot_be_inferred branch from f8622ef to 123e63c Compare May 23, 2025 11:52
Base automatically changed from 05-22-fix_isolated-declarations_incorrect_type_of_object_property_accessor to main May 23, 2025 11:57
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label May 23, 2025
@graphite-app graphite-app bot merged commit 123e63c into main May 23, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 05-22-feat_isolated-declarations_report_an_error_for_object_methods_whose_return_type_cannot_be_inferred branch May 23, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-isolated-declarations Isolated Declarations C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants