Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/documentation/copy/en/reference/Utility Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ Released:
Blocks inferences to the contained type. Other than blocking inferences, `NoInfer<Type>` is
identical to `Type`.

For example, the `createStreetLight()` function below is called with a `colors` value of `["red", "yellow", "green"]`, making the `C` type parameter be a union of `"red" | "yellow" | "green"` (so `"blue"` would not be a valid default), but if `NoInfer<C>` was not used, the `defaultColor`'s type of `"blue"` would get added to the type parameter union, so the compiler would consider `"blue"` as a valid default even though it's not in the list of `colors`.

##### Example

```ts
Expand Down