diff --git a/.gitignore b/.gitignore index 6978e3523..f6a13b6ea 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ # tyescript related output files addon-test-support/**/*.js addon-test-support/**/*.d.ts +public-types diff --git a/package.json b/package.json index f18f6aa24..e132d1586 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,10 @@ "test": "tests" }, "scripts": { - "prepack": "yarn babel --extensions '.ts' --presets @babel/preset-typescript addon-test-support --out-dir addon-test-support/ --ignore '**/*.d.ts'", + "build:types": "tsc", + "build:js": "yarn babel --extensions '.ts' --presets @babel/preset-typescript addon-test-support --out-dir addon-test-support/ --ignore '**/*.d.ts'", + "build": "npm-run-all --parallel build:*", + "prepack": "yarn build", "postpack": "rimraf addon-test-support/**/*.js", "clean": "git clean -x -f", "docs": "documentation build --document-exported \"addon-test-support/@ember/test-helpers/index.js\" --config documentation.yml --markdown-toc-max-depth 3 -f md -o API.md", @@ -152,5 +155,12 @@ "volta": { "node": "12.22.4", "yarn": "1.22.4" + }, + "typesVersions": { + "*": { + "*": [ + "public-types/*" + ] + } } } diff --git a/tsconfig.json b/tsconfig.json index 4a68608c9..241317076 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,11 @@ { "extends": "@tsconfig/ember/tsconfig.json", "compilerOptions": { + // Use TS to emit declarations + "noEmit": false, + "emitDeclarationOnly": true, + "outDir": "public-types", + "paths": { "dummy/tests/*": ["./tests/*"], "dummy/*": ["./tests/dummy/app/*", "./app/*"],