Skip to content

Commit 791bf8d

Browse files
authored
fix: restore TypeScript 4.0 compatibility in types (#20504)
* fix: restore TypeScript 4.0 compatibility in types * fix ci * add TypeScript 4.0 CI typecheck * remove test:types:ts40 script
1 parent af498c6 commit 791bf8d

3 files changed

Lines changed: 501 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,23 @@ jobs:
150150
working-directory: ${{ matrix.package.directory }}
151151
run: npm run test:types
152152

153+
test_types_ts40:
154+
name: Test DefinitelyTyped-derived Types (TypeScript 4.0)
155+
runs-on: ubuntu-latest
156+
steps:
157+
- uses: actions/checkout@v5
158+
- uses: actions/setup-node@v6
159+
with:
160+
node-version: "lts/*"
161+
- name: Install Packages
162+
run: npm install
163+
164+
- name: Install TypeScript 4.0 Toolchain
165+
run: npm install --no-save typescript@~4.0 @types/node@~16.11
166+
167+
- name: Typecheck on TypeScript 4.0
168+
run: npx tsc -p tests/lib/types/tsconfig.ts40.json
169+
153170
pnpm_test:
154171
name: Test pnpm Type Support
155172
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)