From 715820b8129f2e48ba789af94289ab630b609547 Mon Sep 17 00:00:00 2001 From: miqlangelo Date: Tue, 6 May 2025 13:07:37 +0200 Subject: [PATCH] update --- .gitignore | 3 ++- src/06-compiler/debug-demo/index.ts | 7 +++++++ src/06-compiler/my-react-app/src/App.tsx | 9 ++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 src/06-compiler/debug-demo/index.ts diff --git a/.gitignore b/.gitignore index 600e365..569ce53 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -**/node_modules \ No newline at end of file +**/node_modules +**/dist \ No newline at end of file diff --git a/src/06-compiler/debug-demo/index.ts b/src/06-compiler/debug-demo/index.ts new file mode 100644 index 0000000..d63a152 --- /dev/null +++ b/src/06-compiler/debug-demo/index.ts @@ -0,0 +1,7 @@ +function add(a: number, b: number) { + const c = a + b; + console.log(c); + return c; +} + +add(2, 3); diff --git a/src/06-compiler/my-react-app/src/App.tsx b/src/06-compiler/my-react-app/src/App.tsx index cc30b23..4d1e350 100644 --- a/src/06-compiler/my-react-app/src/App.tsx +++ b/src/06-compiler/my-react-app/src/App.tsx @@ -2,13 +2,20 @@ import './App.css'; import Button from './components/Button'; function App() { + const handleClick = () => { + const a = 1; + const b = 2; + const c = a + b; + console.log(c); + }; + return ( <>

Hello Typescript with React and Vite