Type Alias Constrain<T, TConstraint>

Constrain<T, TConstraint>: {
    [K in ConstrainedKeys<T, TConstraint>]: T[K]
}

Creates a Type that is a subset of T containing only properties also found in TConstraint

Type Parameters

  • T extends {}
  • TConstraint extends {}