Skip to content

Commit 8c51968

Browse files
authored
feat: use downlevel-dts to generate TS 3.4 compatible types (#266)
1 parent 588e173 commit 8c51968

File tree

1 file changed

+8
-1
lines changed
  • smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen

1 file changed

+8
-1
lines changed

smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/base-package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"test": "yarn build && jest --coverage --passWithNoTests",
1414
"build:cjs": "tsc -p tsconfig.json",
1515
"build:es": "tsc -p tsconfig.es.json",
16-
"build": "yarn build:cjs && yarn build:es"
16+
"build": "yarn build:cjs && yarn build:es",
17+
"postbuild": "downlevel-dts types types/ts3.4"
1718
},
1819
"main": "./dist/cjs/index.js",
1920
"types": "./types/index.d.ts",
@@ -29,12 +30,18 @@
2930
"tslib": "^2.0.0"
3031
},
3132
"devDependencies": {
33+
"downlevel-dts": "0.7.0",
3234
"jest": "^26.1.0",
3335
"rimraf": "^3.0.0",
3436
"typedoc": "^0.19.2",
3537
"typescript": "~4.1.2"
3638
},
3739
"engines": {
3840
"node": ">=10.0.0"
41+
},
42+
"typesVersions": {
43+
"<3.9": {
44+
"types/*": ["types/ts3.4/*"]
45+
}
3946
}
4047
}

0 commit comments

Comments
 (0)