Skip to content

Commit

Permalink
Update explanation for NeverGeneric<never>
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift authored Jul 26, 2023
1 parent b4bff77 commit 5891cf6
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions episodes/extending never/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,33 +207,27 @@ type NeverGenericEquivalences = [
/**
* `never` is the empty union of ZERO elements
*
* NeverGeneric<(|)>,
* NeverGeneric<(|)>,
*/

/**
* This distribution over the empty union
* never happens (there's nothing to distribute over).
/** This distribution over the empty union never happens (there's nothing to distribute over).
*
* | NeverGeneric<(|)>
* | NeverGeneric<(|)>,
* (| NeverGeneric<(|)>),
*/

/**
* This conditional is never evaluated, and
* the `true`/`false` branches are both unreachable.
/** This conditional is never evaluated, and the `true`/`false` branches are both unreachable.
*
* ((|) extends never ? true : false),
* (| ((|) extends never ? true : false)),
*/

/**
* NeverGeneric<never> resolves to an empty union
/** NeverGeneric<never> resolves to an empty union.
*
* (|),
* (|),
*/

/** ...which is `never` by definition. */
never,
]

]>



Expand Down

0 comments on commit 5891cf6

Please sign in to comment.