-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] correct generated type declaration #3840
Conversation
- Add types/rules/jsx-no-literals.d.ts to avoid error TS2309: An export assignment cannot be used in a module with other exported elements.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3840 +/- ##
==========================================
+ Coverage 97.61% 97.67% +0.06%
==========================================
Files 133 136 +3
Lines 9959 9979 +20
Branches 3694 3699 +5
==========================================
+ Hits 9721 9747 +26
+ Misses 238 232 -6 ☔ View full report in Codecov by Sentry. |
ok, i fixed the issue with index.js in master, but i've rebased this PR on top of that, since this is probably a better outcome still :-) |
@ljharb Hi. Thanks for your review. I've addressed all your previous comments. In addition to that, I was thinking why we have issues like #3838 even if we have
// Bad
/** @type {import('eslint').Linter.Config[]} */
module.exports = [ ... ]
// Good
/** @type {import('eslint').Linter.Config[]} */
const config = [ ... ]
module.exports = config;
$ cd test-published-types
$ npx tsc --lib es2015
node_modules/eslint/lib/types/index.d.ts:928:81 - error TS2574: A rest element type must be an array type.
928 type RuleSeverityAndOptions<Options extends any[] = any[]> = [RuleSeverity, ...Partial<Options>];
~~~~~~~~~~~~~~~~~~~ I need to fix it by adding |
Any updates on this? 👀 |
ade24b6
to
e80def4
Compare
Closes #3838
This PR fixes various issues in the generated
index.d.ts
. The full diff forindex.d.ts
can be viewed in this link. The change highlight are shown below: