2019-08-15 04:53:26 -05:00
|
|
|
export type FunctionPropertyNames<T> = {
|
|
|
|
[K in keyof T]: T[K] extends Function ? K : never
|
|
|
|
}[keyof T]
|
2019-08-09 01:17:16 -05:00
|
|
|
|
|
|
|
export type FunctionProperties<T> = Pick<T, FunctionPropertyNames<T>>
|
2019-08-15 04:53:26 -05:00
|
|
|
|
|
|
|
export type PickWith<T, KT extends keyof T, V> = {
|
|
|
|
[P in KT]: T[P] extends V ? V : never
|
|
|
|
}
|
|
|
|
|
|
|
|
export type PickWithOpt<T, KT extends keyof T, V> = {
|
|
|
|
[P in KT]?: T[P] extends V ? V : never
|
|
|
|
}
|