From c4cce3c900e9b5cca36a7f6e945ed60d90c03e98 Mon Sep 17 00:00:00 2001 From: peetzweg/ <839848+peetzweg@users.noreply.github.com> Date: Tue, 28 Feb 2023 01:30:00 +0100 Subject: [PATCH] feat(*): Converts Codebase to TypeScript (#10) * upgrade react and convert to typescript project * adds some typing to the useMessages hook * changes dev server port back to previous default * adds types to all files * moves static prop to inner div as it's prevent text wrapping the bubble. `style` is not a valid motion.div prop. * fixes bouncing bubbles on when disappearing. * organizes imports * revert unintended change of timeout length --- index.html | 2 +- package-lock.json | 2746 +++++++------------- package.json | 16 +- src/{App.jsx => App.tsx} | 8 +- src/{bubble-input.jsx => bubble-input.tsx} | 26 +- src/{bubble.jsx => bubble.tsx} | 17 +- src/{chat.jsx => chat.tsx} | 4 +- src/main.jsx | 11 - src/main.tsx | 10 + src/{use-messages.js => use-messages.ts} | 14 +- src/vite-env.d.ts | 1 + tsconfig.json | 21 + tsconfig.node.json | 9 + vite.config.js => vite.config.ts | 5 +- 14 files changed, 1083 insertions(+), 1807 deletions(-) rename src/{App.jsx => App.tsx} (89%) rename src/{bubble-input.jsx => bubble-input.tsx} (66%) rename src/{bubble.jsx => bubble.tsx} (73%) rename src/{chat.jsx => chat.tsx} (50%) delete mode 100644 src/main.jsx create mode 100644 src/main.tsx rename src/{use-messages.js => use-messages.ts} (59%) create mode 100644 src/vite-env.d.ts create mode 100644 tsconfig.json create mode 100644 tsconfig.node.json rename vite.config.js => vite.config.ts (61%) diff --git a/index.html b/index.html index 27c894f..c5fdc83 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,6 @@
- +