Answers for "how to convert js to ts"

0

how to convert js to ts

import React from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import FirstStep from '../components/FirstStep';
import Header from '../components/Header';

const AppRouter = () => (
  <BrowserRouter>
    <div className="container">
      <Header />
      <Switch>
        <Route component={FirstStep} path="/" exact={true} />
      </Switch>
    </div>
  </BrowserRouter>
);

export default AppRouter;
Posted by: Guest on October-25-2021
0

convert javascript to typescript

1. Add tsconfig.json file to project
2. Integrate with a build tool
3. Change all .js files to .ts files
4. Check for any errors
Posted by: Guest on February-23-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language