diff --git a/docs/advanced/patterns_by_usecase.md b/docs/advanced/patterns_by_usecase.md index ede4726a..8d64b984 100644 --- a/docs/advanced/patterns_by_usecase.md +++ b/docs/advanced/patterns_by_usecase.md @@ -571,7 +571,7 @@ function handle(event: UserEvent) {
- Take care: TypeScript does not narrow the type of a Discriminated Union on the basis of typeof checks. The type guard has to be on the value of a key and not it's type. + Take care: TypeScript does not narrow the type of a Discriminated Union on the basis of typeof checks. The type guard has to be on the value of a key and not its type. ```ts @@ -589,7 +589,7 @@ function handle(event: UserEvent) { } ``` -The above example does not work as we are not checking the value of `event.value` but only it's type. Read more about it [microsoft/TypeScript#30506 (comment)](https://github.com/microsoft/TypeScript/issues/30506#issuecomment-474858198) +The above example does not work as we are not checking the value of `event.value` but only its type. Read more about it [microsoft/TypeScript#30506 (comment)](https://github.com/microsoft/TypeScript/issues/30506#issuecomment-474858198)
diff --git a/docs/advanced/utility-types.md b/docs/advanced/utility-types.md index f58d1b80..c50018a6 100644 --- a/docs/advanced/utility-types.md +++ b/docs/advanced/utility-types.md @@ -8,7 +8,7 @@ We will assume knowledge of utility types covered in the sister project [`typesc If you intend to maintain a large TS codebase/a nontrivial React+TS library, **we strongly recommend exploring these utilities** so that you don't reinvent the wheel and/or lose sanity trying to do so. Studying their code can also teach you a lot of advanced TS that is not covered here. -I also recommend have a good working knowledge of how to construct the inbuilt utility types from scratch. See [Dr. Rauschmayer's guide](https://2ality.com/2020/06/computing-with-types.html) for a concise introduction. +I also recommend having a good working knowledge of how to construct the inbuilt utility types from scratch. See [Dr. Rauschmayer's guide](https://2ality.com/2020/06/computing-with-types.html) for a concise introduction. A level of comfort with **generic types** is therefore required. Here are some helpful resources: diff --git a/docs/hoc/index.md b/docs/hoc/index.md index 6256a12d..d2992ea3 100644 --- a/docs/hoc/index.md +++ b/docs/hoc/index.md @@ -8,7 +8,7 @@ title: HOC Cheatsheet - We will map closely to [the official docs on HOCs](https://reactjs.org/docs/higher-order-components.html) initially - While hooks exist, many libraries and codebases still have a need to type HOCs. -- Render props may be considered in future +- Render props may be considered in the future - The goal is to write HOCs that offer type safety while not getting in the way. Here is a base HOC example you can copy right away: