chore: Migrate animatedStyleAugmentation type tests to TSTyche#9564
Closed
MatiPl01 wants to merge 1 commit into
Closed
chore: Migrate animatedStyleAugmentation type tests to TSTyche#9564MatiPl01 wants to merge 1 commit into
MatiPl01 wants to merge 1 commit into
Conversation
Convert the AnimatedStyle augmentation regression suite (coverage for #9328) from tsc to TSTyche. These are contextual-assignment compile checks - each `const s: AnimatedStyle<...> = { ... }` must type-check - so they stay as typed assignments inside `test()` blocks, which TSTyche validates by type-checking the file. `toBeAssignableTo` is unsuitable here: it infers the object literal standalone and widens its string literals (e.g. `'allow-discrete'` -> `string`), which would wrongly reject the augmented-style cases. Builds on the TSTyche setup and type:check:tests wiring in #9557.
Member
Author
|
Too small on its own — folded into #9565 to keep PRs larger. |
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
Continues the TSTyche migration (after #9557 / #9562 / #9563) with the
AnimatedStyleaugmentation regression suite (coverage for #9328 — Expo'sexpo-env.d.tsaugmenting RN styles with CSS-like fields).const s: AnimatedStyle<…> = { … }must type-check. They stay as typed assignments insidetest()blocks, which TSTyche validates by type-checking the whole file (verified it does flag a bad assignment).toBeAssignableTois deliberately not used here: it infers the object literal standalone and widens string literals (e.g.'allow-discrete'→string), which would wrongly reject the augmented-style cases that the original (contextually-typed) assignments accept.Stacked on #9557 (needs its TSTyche setup +
type:check:testswiring).Test plan
yarn workspace react-native-reanimated type:check:testspasses (old harness + TSTyche).