From 08c102e8f59028dc2765414efd8bc67dd34467ed Mon Sep 17 00:00:00 2001 From: "umamahesh.b" Date: Wed, 12 Aug 2026 12:39:00 +0530 Subject: [PATCH] added some code --- .vscode/launch.json | 18 ++++++++++++++++++ test_ts/dist/index.js | 9 +++++++++ test_ts/dist/index.js.map | 2 +- test_ts/src/index.ts | 19 ++++++++++++++++++- 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..73e321b --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}\\test_ts\\src\\index.ts", + "preLaunchTask": "tsc: build - test_ts/tsconfig.json", + "outFiles": [ + "${workspaceFolder}/**/*.js" + ] + } + ] +} \ No newline at end of file diff --git a/test_ts/dist/index.js b/test_ts/dist/index.js index f0d8cbe..a3e8a0c 100644 --- a/test_ts/dist/index.js +++ b/test_ts/dist/index.js @@ -5,4 +5,13 @@ const mahesh = { email: 'umamahesh.b', age: 25 }; +function isVoter() { + if (mahesh.age > 18) + return console.log('He is eligible'); +} +isVoter(); +function numbers(a, b) { + console.log(a + b); +} +numbers(2, 3); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test_ts/dist/index.js.map b/test_ts/dist/index.js.map index 503ae32..409b2ab 100644 --- a/test_ts/dist/index.js.map +++ b/test_ts/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAMA,MAAM,MAAM,GAAQ;IAChB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,aAAa;IACpB,GAAG,EAAG,EAAE;CACX,CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAMA,MAAM,MAAM,GAAQ;IAChB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,aAAa;IACpB,GAAG,EAAG,EAAE;CACX,CAAA;AAGD,SAAS,OAAO;IACZ,IAAG,MAAM,CAAC,GAAG,GAAG,EAAE;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;AAC5D,CAAC;AAED,OAAO,EAAE,CAAA;AAET,SAAS,OAAO,CAAC,CAAQ,EAAC,CAAQ;IAC9B,OAAO,CAAC,GAAG,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC;AACrB,CAAC;AAED,OAAO,CAAC,CAAC,EAAC,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/test_ts/src/index.ts b/test_ts/src/index.ts index 9ccaa56..75985cd 100644 --- a/test_ts/src/index.ts +++ b/test_ts/src/index.ts @@ -8,4 +8,21 @@ const mahesh:user = { name: 'Umamahesh', email: 'umamahesh.b', age : 25 -} \ No newline at end of file +} + + +function isVoter() { + if(mahesh.age > 18) return console.log('He is eligible') +} + +isVoter() + +function numbers(a:number,b:number) : number{ + console.log(a+b); + return a+b; +} + +numbers(2,3) + + +