Skip to content

Commit 59e46d0

Browse files
authored
feat: Add TypeScript support (#9550)
1 parent a97d418 commit 59e46d0

11 files changed

+2925
-153
lines changed

.babelrc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"plugins": [
3-
"@babel/plugin-transform-flow-strip-types",
4-
"@babel/plugin-proposal-object-rest-spread"
3+
"@babel/plugin-transform-flow-strip-types"
54
],
65
"presets": [
6+
"@babel/preset-typescript",
77
["@babel/preset-env", {
88
"targets": {
9-
"node": "14",
9+
"node": "18"
1010
},
1111
"exclude": ["proposal-dynamic-import"]
1212
}]

.github/workflows/ci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,17 @@ jobs:
138138
uses: mansona/npm-lockfile-version@v1
139139
with:
140140
version: 2
141+
check-types:
142+
name: Check Types
143+
timeout-minutes: 5
144+
runs-on: ubuntu-latest
145+
steps:
146+
- uses: actions/checkout@v3
147+
- run: npm ci
148+
- name: Build types
149+
run: npm run build:types
150+
- name: Check types
151+
run: npm run test:types
141152
check-mongo:
142153
strategy:
143154
matrix:

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ node_modules
4646

4747
# Babel.js
4848
lib/
49+
# types/* once we have full typescript support, we can generate types from the typescript files
50+
!types/tsconfig.json
4951

5052
# cache folder
5153
.cache

0 commit comments

Comments
 (0)