From d9557108f1f835b8daf27dcc6a685a919a4afb6a Mon Sep 17 00:00:00 2001
From: eps1lon <sebastian.silbermann@vercel.com>
Date: Wed, 28 Aug 2024 15:29:00 +0200
Subject: [PATCH] test: Run with relevant React stable types

This has no effect right now.
Once React 19 is out, we're running tests in both 18 and 19.
The types should match that dimension.

Ideally, we'd be able to test RC types but npm claims `npm install @types/react@npm:types-react@rc` is an invalid comparator.
Putting that in the package.json works but I'm too lazy to write a dedicated script right now.
---
 .github/workflows/validate.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 488c633b..f239c717 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -55,6 +55,12 @@ jobs:
       - name: ⚛️ Setup react
         run: npm install react@${{ matrix.react }} react-dom@${{ matrix.react }}
 
+      - name: ⚛️ Setup react types
+        if: ${{ matrix.react != 'canary' && matrix.react != 'experimental' }}
+        run:
+          npm install @types/react@${{ matrix.react }} @types/react-dom@${{
+          matrix.react }}
+
       - name: ▶️ Run validate script
         run: npm run validate