Repository navigation
test(types): pin the public types of nine packages - #425
Merged
Merged
Conversation
Adds published-declaration fixtures for core, react, effect-ui, properties, vite-plugin, next-plugin, unplugin, layergate and the CLI: 205 new negative assertions covering unknown keys and tokens in style bodies, option key sets and required keys, subpath entries, and builder inputs and outputs. Twelve new projects join scripts/verify/types.sh, compiled against the built declarations on TypeScript 7.0.2 and 5.9.3 with and without exactOptionalPropertyTypes. No library type changes. AGENTS.md gains verify:types on the change-map rows for the packages that now have type fixtures. Verified at this commit: vp run build:ts, verify:types, verify:lint and verify:compile. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Adds type-narrowness fixtures for the public types that had none, on top of the
types/layout introduced in #424. No library type changes.What is pinned
corekit,chain,groups,theme,exports,vocabularyasset, appearance, every subpath entryreactstyle-objects,entriesAnimusExtended,SystemInstance,ComposedFamilyeffect-uivars,buildersdefineVars,kitVars,bindEffectUiSystem, contract types, slot types, undeclared state and compound keyspropertiesexportsvite-plugin,next-plugin,unplugin,layergate,cli205 new negative assertions. Every fixture compiles against the built declarations on TypeScript 7.0.2 and 5.9.3, with and without
exactOptionalPropertyTypes.Other changes
scripts/verify/types.sh: twelve new projects and six more freshness checks; thedistcheck also acceptsindex.d.mtsforlayergate. The tier takes about 15 s instead of 9 s and needs fresh dists of the six added packages.AGENTS.md:vp run verify:typesis added to the change-map rows forproperties, the three plugins,layergateandextract/pipeline.packages/react/types/published/guards.tsgains a sharedRequiredKeyshelper; the effect-ui mock host moves tohost.tsso fixtures can share it.Findings, not fixed here
Places where a published type is wider than a consumer would expect. The first four accept input that then fails or misbehaves at run time:
addColorModesaccepts an unknown colour token, a non-string alias, an initial mode not in the config, and abasedOnnaming no mode.@animus-ui/unpluginadapters compile with no options, thoughsystemis required..contract()accepts a misspelled key beside a valid one, which silently drops the obligation.addSelectorsaccepts an alias without the_prefix.Also: CSS keyword values are open (
display: 'flexx'compiles); diagnostic codes are open strings; underscore aliases are open untilConditionsandSelectorsare augmented; a numeric key nested in a colour group has value typenever; the CLI publishes no config type;TurbopackLoaderOptionsis not exported.Verification
vp run build:ts,verify:types,verify:lintandverify:compilepass at1f053bc5.@ts-expect-errorin a copy and confirmed each line fails on both compilers.🤖 Generated with Claude Code