From 0d209b544031270bb1a6e9c25ad502b514cee259 Mon Sep 17 00:00:00 2001 From: Jinny You Date: Mon, 18 Dec 2023 15:49:15 +0900 Subject: [PATCH] web: Set up typescript --- web/package.json | 5 ++++- web/tsconfig.json | 40 ++++++++++++++++++++++++++++++++++++++++ web/yarn.lock | 8 ++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 web/tsconfig.json create mode 100644 web/yarn.lock diff --git a/web/package.json b/web/package.json index f1bbcaba..812d4e3e 100644 --- a/web/package.json +++ b/web/package.json @@ -21,5 +21,8 @@ "animation", "thorvg", "tvg" - ] + ], + "devDependencies": { + "typescript": "^5.3.2" + } } diff --git a/web/tsconfig.json b/web/tsconfig.json new file mode 100644 index 00000000..7b7e0c34 --- /dev/null +++ b/web/tsconfig.json @@ -0,0 +1,40 @@ +{ + "compilerOptions": { + "baseUrl": "./", + "paths": { + "@dist/*": [ + "dist/*" + ] + }, + "target": "es2017", + "lib": [ + "esnext.array", + "esnext", + "es2017", + "dom" + ], + "experimentalDecorators": true, + "module": "esnext", + "moduleResolution": "node", + "allowJs": true, + "checkJs": false, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitAny": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true + }, + "include": [ + "src/**/*.ts" + ], + "exclude": [ + "node_modules", + ], +} diff --git a/web/yarn.lock b/web/yarn.lock new file mode 100644 index 00000000..fce89544 --- /dev/null +++ b/web/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +typescript@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.2.tgz#00d1c7c1c46928c5845c1ee8d0cc2791031d4c43" + integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==