allenvarughese22 / task7

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

description

The details function is a TypeScript function that accepts two parameters: nation (a string) and code (a number). It returns a formatted string containing information about a nation.

The app includes the following features:

A React component named App that uses the useState hook to manage a count state.
The details function imported from the task.ts file, which takes a nation name and code as parameters and returns a string.
An object person that conforms to the Person interface defined in task.ts.
The component displays the result of the details function and the name and age properties of the person object.

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: ['./tsconfig.json', './tsconfig.node.json'],
    tsconfigRootDir: __dirname,
  },
}
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list

About


Languages

Language:CSS 45.6%Language:TypeScript 33.7%Language:JavaScript 11.3%Language:HTML 9.4%