Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

The noCheck warning was shown even when extract.checkTypes = false in package.config.ts, despite this option having the same effect as setting noCheck: true in tsconfig.json.

Changes

  • Suppressed warning when extract.checkTypes = false: Added condition check to skip the warning when type checking is already disabled via package config
  • Updated warning message: Clarified that users can set either noCheck: true in tsconfig.json or extract: { checkTypes: false } in package.config.ts

The logic already exists in buildTypes.ts where checkTypes: false sets noCheck: true:

noCheck:
  checkTypes === false
    ? true
    : (tsconfig.options.noCheck ?? tsconfig.options.isolatedDeclarations)

The warning condition now respects this equivalence.

Original prompt

This section details on the original issue you should resolve

<issue_title>noCheck warning is shown when extract.checkTypes is false</issue_title>
<issue_description>When extract.checkTypes = false we should not be showing this warning in the console:

`noCheck` is not set to `true` in the tsconfig.json file used by `package.config.ts`. This makes generating dts files slower than it needs to be, as it will perform type checking on the dts files while at it.

This warning is in this case incorrect.

The warning should also be updated to inform that it's possible to set extract.checkTypes = false in package.config.ts as an alternative to noCheck: true in tsconfig.json</issue_description>

<agent_instructions>Remember to run pnpm changeset add when you're done</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot
Copy link

changeset-bot bot commented Dec 15, 2025

🦋 Changeset detected

Latest commit: 3726d54

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sanity/pkg-utils Patch

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

Copilot AI changed the title [WIP] Fix incorrect noCheck warning for extract.checkTypes setting Fix noCheck warning when extract.checkTypes is false Dec 15, 2025
Copilot AI requested a review from stipsan December 15, 2025 13:10
@stipsan stipsan marked this pull request as ready for review December 15, 2025 15:57
@stipsan stipsan merged commit cc3f98d into main Dec 15, 2025
14 checks passed
@stipsan stipsan deleted the copilot/fix-nocheck-warning-issue branch December 15, 2025 15:57
@squiggler squiggler bot mentioned this pull request Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

noCheck warning is shown when extract.checkTypes is false

2 participants