Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

TypeScript_Notes

Description: Notes about TypeScript

Compile TypeScript

  • If you don't have TypeScript installed in local project

    • npx tsc fileName.ts
    • This file gets converted to a JS file
    • Before that happends, TS checkes file for errors
    • Most errors will be seen in IDE before compilation
  • Typescript info

    • Generic type only works in conjunction with another type (the connected type). You add the other type in the angle brackets
  • React with Typescript

    • Typescript compilation will be part of build process for React (since react uses JSX which has to be converted to JS)
  • What to add types for in React

    • Props
    • If using arrow function to define component, you can also use the FC type.
    • State
    • Functions defined in your component

About

Notes about TypeScript

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors