From 41211f8b61d741afbc176a57be7b74912cbe9322 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Fri, 22 Jan 2021 14:01:32 -0800 Subject: [PATCH] feat: use downlevel-dts to generate TS 3.4 compatible types (#266) --- .../amazon/smithy/typescript/codegen/base-package.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/base-package.json b/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/base-package.json index dea467427cb..7c27b6c20e5 100644 --- a/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/base-package.json +++ b/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/base-package.json @@ -13,7 +13,8 @@ "test": "yarn build && jest --coverage --passWithNoTests", "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", - "build": "yarn build:cjs && yarn build:es" + "build": "yarn build:cjs && yarn build:es", + "postbuild": "downlevel-dts types types/ts3.4" }, "main": "./dist/cjs/index.js", "types": "./types/index.d.ts", @@ -29,6 +30,7 @@ "tslib": "^2.0.0" }, "devDependencies": { + "downlevel-dts": "0.7.0", "jest": "^26.1.0", "rimraf": "^3.0.0", "typedoc": "^0.19.2", @@ -36,5 +38,10 @@ }, "engines": { "node": ">=10.0.0" + }, + "typesVersions": { + "<3.9": { + "types/*": ["types/ts3.4/*"] + } } }