Repository navigation
Fix(CSS): TypeScript narrow on aliasVariableModeResolver closure - #429
Merged
Merged
Conversation
|
@0Miles is attempting to deploy a commit to the Aoyue Team on Vercel. A member of the Team first needs to authorize it. |
Pre-existing strict-TS error in core.ts:resolveVariables. The inner closure references an outer let binding that TypeScript can't prove non-undefined after the if-block assignment. Pull the assignment out of the conditional and capture into a const, so the closure references a definitely-defined value. Surfaces only when a downstream package (extractor) type-checks core under stricter resolution — pnpm --filter @master/css-extractor type-check fails on every rc-based commit. - tsc --noEmit passes for core, extractor, and all 17 issue-resolving branches - 108 core test files still pass - Runtime behaviour unchanged (same control flow, just type-narrowed)
0Miles
force-pushed
the
fix/core-type-error
branch
from
April 30, 2026 19:05
d353373 to
82beec4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pre-existing strict-TS error in `packages/core/src/core.ts:resolveVariables`. The inner closure references an outer `let` binding that TypeScript can't prove non-undefined after the if-block assignment.
Fix: pull the assignment out of the conditional and capture into a
const, so the closure references a definitely-defined value.Why this matters
Surfaces only when a downstream package (extractor) type-checks core under stricter resolution —
pnpm --filter @master/css-extractor type-checkwas failing on everyrc-based commit.Testing
tsc --noEmitpasses for core, extractor, and all 17 issue-resolving branches