Type alias NonTypePropertys<T, KT>

NonTypePropertys<T, KT>: Pick<T, NonTypePropertyNames<T, KT>>

剔除T类型中值为KT类型的键

    class A
{
a = 1;
f(){}
}

var a: NonTypePropertys<A, number>; //var a: Pick<A, "f">
var a1: NonTypePropertys<A, Function>; //var a1: Pick<A, "a">

Type Parameters

  • T

  • KT

Generated using TypeDoc