typescript config
//type config configuration
{
"compilerOptions": {
"outDir": "dist",
"target": "ESNext",
"module": "CommonJS",
"moduleResolution": "node",
"esModuleInterop": true,
"downlevelIteration": true,
"allowSyntheticDefaultImports": true,
"importHelpers": true,
"skipLibCheck": true,
"sourceMap": true,
"removeComments": true,
"noEmitOnError": true,
"strict": false,
"alwaysStrict": false,
"noImplicitAny": false,
"typeRoots": ["node_modules/@types/"]
},
"include": ["server.ts", "src/**/*.ts", "knexfile.ts"],
"exclude": ["node_modules", "dist", "__tests__"]
}
// my package.json
{
"name": "express-payment-gateway",
"version": "1.0.0",
"description": "express payment gateway",
"main": "dist/server.js",
"scripts": {
"cleanup": "rimraf dist",
"compiler": "tsc --pretty",
"compiler:watch": "tsc --watch",
"build": "npm run cleanup && npm run compiler",
"start": "node dist/server.js",
"dev": "nodemon -w *.ts -e ts -x ts-node --files -H -T server.ts"
},
"repository": {
"type": "git",
"url": "restuwahyu13"
},
"keywords": [
"wabot",
"whatsapp"
],
"author": "restuwahyu13",
"license": "MIT",
"dependencies": {
"@sendgrid/mail": "^7.4.0",
"bcryptjs": "^2.4.3",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"express": "^4.17.1",
"express-rate-limit": "^5.2.3",
"express-slow-down": "^1.4.0",
"express-validator": "^6.9.2",
"helmet": "^4.2.0",
"js-base64": "^3.6.0",
"jsonwebtoken": "^8.5.1",
"knex": "^0.21.15",
"moment": "^2.29.1",
"multer": "^1.4.2",
"pg": "^8.5.1",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.2",
"@types/body-parser": "^1.19.0",
"@types/compression": "^1.7.0",
"@types/cookie-parser": "^1.4.2",
"@types/cors": "^2.8.9",
"@types/eslint": "^7.2.6",
"@types/express": "^4.17.9",
"@types/express-rate-limit": "^5.1.0",
"@types/express-slow-down": "^1.3.0",
"@types/express-validator": "^3.0.0",
"@types/helmet": "^4.0.0",
"@types/http-errors": "^1.8.0",
"@types/js-base64": "^3.0.0",
"@types/jsonwebtoken": "^8.5.0",
"@types/knex": "^0.16.1",
"@types/moment": "^2.13.0",
"@types/morgan": "^1.9.2",
"@types/multer": "^1.4.5",
"@types/node": "^14.14.16",
"@types/pg": "^7.14.7",
"@types/request": "^2.48.5",
"@types/sendgrid": "^4.3.0",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^4.11.0",
"@typescript-eslint/parser": "^4.11.1",
"babel-eslint": "^10.1.0",
"dotenv": "^8.2.0",
"eslint": "^7.16.0",
"eslint-config-prettier": "^7.1.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.0",
"eslint-plugin-promise": "^4.2.1",
"husky": "^4.3.6",
"morgan": "^1.10.0",
"nodemon": "^2.0.6",
"npm": "^7.3.0",
"prettier": "2.2.1",
"rimraf": "^3.0.2",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
}
}
4.5
2
{
"compilerOptions": {
"target": "ES2015",
"module": "commonjs",
"lib": [ "ES2015", "dom" ],
"sourceMap": true,
"outDir": "./script",
"strict": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true,
"experimentalDecorators": true,
}
}
Thank you!
2
0
4.29
7
{
"compilerOptions": {
"resolveJsonModule": true,
},
"include": [
"*/src/**/package.json"
]
}
Thank you!
7
0
4.1
10
{
"compilerOptions": {
"skipLibCheck": true,
...
},
...
}
Thank you!
10
0
0
0
{
"compilerOptions": {
"module": "esnext",
"target": "es2016",
"jsx": "react-jsx",
"strictFunctionTypes": true,
"sourceMap": true,
"outDir": "./build",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
},
"exclude": ["node_modules", "**/node_modules/*"],
"include": ["src", "electron/renderer.ts"]
}
Thank you!
0
0
3.8
5
// it can vary a lot, but this is a beggining
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"outDir": "./dist",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.test.ts"]
}
Thank you!
5
0
Are there any code examples left?
New code examples in category TypeScript
-
TypeScript 2022-03-27 19:30:45 typescript promise
-
TypeScript 2022-03-27 17:25:44 how to search for imports in vscode
-
TypeScript 2022-03-27 17:15:20 angular formgroup mark as touched
-
TypeScript 2022-03-27 17:05:06 use of slice and splice add elements array
-
TypeScript 2022-03-27 16:50:23 android studio loop through all objects in layout
-
TypeScript 2022-03-27 14:35:08 wergensherts meaning
-
TypeScript 2022-03-27 13:50:15 remove all the elements from a numpy array python
-
TypeScript 2022-03-27 12:35:49 redux toolkit typescript install
-
TypeScript 2022-03-27 12:35:30 laravel middleware for apis