You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This thread is to document what is needed for typescript in our curriculum, so we could make sure our typescript challenge covers what we used in the codebase.
Typescript
Need simple input / output types
Some function needs to return promises, and define resolved types.
Custom types
The text was updated successfully, but these errors were encountered:
A generic type which can generate type from another type. Basically, it says that return value of Foobar must be either JSX element or null. And if you provide it another argument const Foobar:React.FC<InputPropsType> it means that input value of Foobar must be of InputPropsType.
Long type error messages (the error here is pretty short though):
It would be nice if there were a few examples explaining how to read these messages.
Passing types generated by another library as props to another components/types const [state, setState] = useState(0)
It's totally fine to simply copy React.Dispatch<React.SetStateAction<number>> without trying to understand react generics past "it's a state which can hold only numbers'.
Otherwise adding types to pokemon react challenge should be enough IMO.
Typescript specific operators operators should be defined somewhere. I remember looking at some new code in the codebase a few months ago, and had to ask the engineering channel what !. meant.
Goal
This thread is to document what is needed for typescript in our curriculum, so we could make sure our typescript challenge covers what we used in the codebase.
Typescript
The text was updated successfully, but these errors were encountered: