Added basic Typescript config
This commit is contained in:
parent
52adfa5bef
commit
12c0f47dc7
7
package-lock.json
generated
7
package-lock.json
generated
@ -9,9 +9,16 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@tsconfig/node-lts": "^18.12.5",
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@tsconfig/node-lts": {
|
||||||
|
"version": "18.12.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tsconfig/node-lts/-/node-lts-18.12.5.tgz",
|
||||||
|
"integrity": "sha512-KJZX0kQ5FBv77WDVzmQ9y1dUjaJCNXAAz3LSsg5cMwH0AUijVdDQtII+IVprEXdb13U9GjVOBxBzyRvr/ozPxw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.2.2",
|
"version": "5.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@tsconfig/node-lts": "^18.12.5",
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.2.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
9
src/main.ts
Normal file
9
src/main.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
function sayMyName(name: string): void {
|
||||||
|
if (name === "Heisenberg") {
|
||||||
|
console.log("You're right 👍");
|
||||||
|
} else {
|
||||||
|
console.log("You're wrong 👎");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sayMyName("Heisenberg");
|
6
tsconfig.json
Normal file
6
tsconfig.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"extends": "@tsconfig/node-lts/tsconfig.json",
|
||||||
|
"compilerOptions": {},
|
||||||
|
"include": ["src"],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
Reference in New Issue
Block a user