Type Alias $drain<T>

$drain: [T] extends [unknown] ? T : never

Utility to reduce depth of TypeScript's internal type instantiation stack. Some wizard on the Kysely team came up with this. It improves performance for the math types by an order of magnitude.

Type Parameters

  • T