refactor: convert js to ts

This commit is contained in:
Levi Yan
2024-07-02 12:15:39 +08:00
parent 4afa0ccccc
commit fd9fe52529
12 changed files with 207 additions and 234 deletions

20
tsconfig.json Normal file
View File

@@ -0,0 +1,20 @@
{
"compilerOptions": {
"module": "Node16",
"target": "ES2022",
"lib": [
"ES2022"
],
"sourceMap": true,
"rootDir": "src",
"strict": true, /* enable all strict type-checking options */
/* Additional Checks */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
/* Emit */
"outDir": "dist", /* Redirect output structure to the directory. */
"removeComments": true, /* Do not emit comments to output. */
"noEmitOnError": true, /* Do not emit outputs if any errors were reported. */
}
}