From 33ffdce5fd6b3d18d54c22d31ce48ba7845c99f5 Mon Sep 17 00:00:00 2001 From: AhriVastaya Date: Sat, 19 Oct 2024 23:28:31 +0000 Subject: [PATCH] Updated files to have type support & enabled strict mode --- src/App.tsx | 2 +- src/index.tsx | 4 ++-- tsconfig.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 97f12ba..b093a44 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,6 @@ import React from 'react'; -function App() { +function App() : JSX.Element { return (
diff --git a/src/index.tsx b/src/index.tsx index ea7d317..9a4b410 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,8 +1,8 @@ +import App from './App'; import React from 'react'; import ReactDOM from 'react-dom/client'; -import App from './App'; -const root = ReactDOM.createRoot( +const root : ReactDOM.Root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); diff --git a/tsconfig.json b/tsconfig.json index a273b0c..fdd47ce 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "dom.iterable", "esnext" ], - "allowJs": true, + "allowJs": false, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true,