Type alias TypePropertys<T, KT>

TypePropertys<T, KT>: Pick<T, TypePropertyNames<T, KT>>

选取T类型中值为KT类型的键

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

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

Type Parameters

  • T

  • KT

Generated using TypeDoc