From 80bcb0256cbc56ede92694009e85f097eb330a5e Mon Sep 17 00:00:00 2001 From: Timur Bolotov Date: Sat, 12 Aug 2023 13:58:24 +0600 Subject: [PATCH] chore: init tsc Signed-off-by: Timur Bolotov --- package.json | 3 ++- tsconfig.json | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tsconfig.json diff --git a/package.json b/package.json index 0085f99d3..d99275273 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,8 @@ "lint": "eslint .", "lint:fix": "eslint . --fix", "license-checker": "license-checker --production --onlyAllow='MIT;Apache-2.0;Apache1.1;ISC;BSD-3-Clause;BSD-2-Clause'", - "build-esm": "npx gen-esm-wrapper . index.mjs && eslint --fix index.mjs" + "build-esm": "npx gen-esm-wrapper . index.mjs && eslint --fix index.mjs", + "build": "tsc" }, "author": "opensearch-project", "original-author": { diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..874010b91 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "outDir": "dist", + "allowJs": true, + "downlevelIteration": true, + "esModuleInterop": true, + "incremental": true, + "lib": ["ES2015"], + "module": "commonjs", + "moduleResolution": "node", + "noFallthroughCasesInSwitch": true, + "preserveConstEnums": true, + "removeComments": true, + "resolveJsonModule": true, + "target": "es5" + }, + "exclude": ["node_modules/", "**/*.test.ts"], + "include": ["lib/**/*", "api/**/*", "index.js"] +}