Skip to content

chore: Migrate animatedStyleAugmentation type tests to TSTyche#9564

Closed
MatiPl01 wants to merge 1 commit into
@matipl01/typetests-tstychefrom
@matipl01/tstyche-style-augmentation
Closed

chore: Migrate animatedStyleAugmentation type tests to TSTyche#9564
MatiPl01 wants to merge 1 commit into
@matipl01/typetests-tstychefrom
@matipl01/tstyche-style-augmentation

Conversation

@MatiPl01

Copy link
Copy Markdown
Member

Summary

Continues the TSTyche migration (after #9557 / #9562 / #9563) with the AnimatedStyle augmentation regression suite (coverage for #9328 — Expo's expo-env.d.ts augmenting RN styles with CSS-like fields).

  • These are contextual-assignment compile checks: each const s: AnimatedStyle<…> = { … } must type-check. They stay as typed assignments inside test() blocks, which TSTyche validates by type-checking the whole file (verified it does flag a bad assignment).
  • toBeAssignableTo is 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:tests wiring).

Test plan

  • yarn workspace react-native-reanimated type:check:tests passes (old harness + TSTyche).

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.
@MatiPl01

Copy link
Copy Markdown
Member Author

Too small on its own — folded into #9565 to keep PRs larger.

@MatiPl01 MatiPl01 closed this May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant