Skip to content

Commit

Permalink
tsMigration
Browse files Browse the repository at this point in the history
Ts migration
  • Loading branch information
pedroacamargo authored Jun 21, 2023
2 parents 9a88f3b + 97f774f commit 99025dc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/index.js → src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';

const root = ReactDOM.createRoot(document.getElementById('root'));
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
);
1 change: 1 addition & 0 deletions src/react-app-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="react-scripts" />
12 changes: 9 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
Expand All @@ -13,8 +19,8 @@
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
},
"include": [
"./src/"
"src"
]
}
}
File renamed without changes.

0 comments on commit 99025dc

Please sign in to comment.