Skip to content

Generate .d.ts files even if syntax or semantic errors are found#269

Merged
mizdra merged 1 commit into
mainfrom
write-files-if-file-has-diagnostics
Oct 10, 2025
Merged

Generate .d.ts files even if syntax or semantic errors are found#269
mizdra merged 1 commit into
mainfrom
write-files-if-file-has-diagnostics

Conversation

@mizdra

@mizdra mizdra commented Oct 10, 2025

Copy link
Copy Markdown
Owner

ref: #178

The ts-plugin was generating type definitions for files containing errors, while codegen was not generating .d.ts files for files with errors. This created a discrepancy in the types recognized by both the tsserver and eslint Language Servers. While this issue is currently mostly unnoticed by most users, it will become more apparent once watch mode is implemented.

Therefore, we'll modify codegen to generate .d.ts files for files containing errors as well.

Incidentally, tsc exhibits similar behavior.

@mizdra mizdra added the Type: Feature New Feature label Oct 10, 2025
@changeset-bot

changeset-bot Bot commented Oct 10, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4cdb04e

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

This PR includes changesets to release 6 packages
Name Type
@css-modules-kit/ts-plugin Minor
@css-modules-kit/codegen Minor
@css-modules-kit/core Minor
css-modules-kit-vscode Patch
@css-modules-kit/stylelint-plugin Patch
@css-modules-kit/eslint-plugin 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

@mizdra mizdra force-pushed the write-files-if-file-has-diagnostics branch from 601f090 to 4cdb04e Compare October 10, 2025 16:34
@mizdra mizdra merged commit 60b7515 into main Oct 10, 2025
14 checks passed
@mizdra mizdra deleted the write-files-if-file-has-diagnostics branch October 10, 2025 16:37
@github-actions github-actions Bot mentioned this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant