-
-
Notifications
You must be signed in to change notification settings - Fork 40
fix: incorrect .d.cts
declaration
#289
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
🦋 Changeset detectedLatest commit: 22ac718 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
WalkthroughA patch for the Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
index.d.ctsOops! Something went wrong! :( ESLint: 9.24.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/lib/index.js' imported from /eslint.config.js 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (12)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 37047ca in 35 seconds
More details
- Looked at
9
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. index.d.cts:1
- Draft comment:
Changed declaration looks correct for a .d.cts file. Ensure that the use of 'typeof import(...)' correctly reflects the exported type from './lib/index.js'. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
2. index.d.cts:1
- Draft comment:
Using 'declare const' with 'typeof import' is correct for a .d.cts file. Confirm that the module's export shape (default vs. named) matches your intent. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
Workflow ID: wflow_rRCromwsFOz81OhG
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #289 +/- ##
=======================================
Coverage 95.99% 95.99%
=======================================
Files 91 91
Lines 4745 4745
Branches 1784 1763 -21
=======================================
Hits 4555 4555
Misses 189 189
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 22ac718 in 58 seconds
More details
- Looked at
22
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. .changeset/sixty-poets-pay.md:2
- Draft comment:
Ensure consistency in changeset YAML formatting; quoted package names are acceptable but verify consistency across changesets. - Reason this comment was not posted:
Confidence changes required:10%
<= threshold50%
None
2. index.d.cts:1
- Draft comment:
Using 'import type' correctly restricts to type-only import for declaration files. Verify that runtime behavior isn’t affected. - Reason this comment was not posted:
Confidence changes required:10%
<= threshold50%
None
3. .changeset/sixty-poets-pay.md:1
- Draft comment:
Changeset file is correctly formatted. The version bump and fix description are clear. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. index.d.cts:1
- Draft comment:
Using 'import type' and the alias with 'declare const' correctly avoids runtime imports. Consider adding a brief comment linking to TS#58195 for future maintainers. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
Workflow ID: wflow_eAU3pyb6Yg9pCeFp
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
It seems |
microsoft/TypeScript#58195
Important
Fixes incorrect type declaration in
index.d.cts
by usingimport type
and declaringeslintPluginImportX
with the correct type.index.d.cts
by changingimport
toimport type
foreslintPluginImportX_
.eslintPluginImportX
astypeof eslintPluginImportX_
to ensure correct type checking.This description was created by
for 22ac718. It will automatically update as commits are pushed.
Summary by CodeRabbit
Summary by CodeRabbit