Add whereDefined and mapCall methods to Collection class

This commit is contained in:
2022-01-20 00:55:11 -06:00
parent 32050cb2ce
commit cfd555723b
2 changed files with 30 additions and 5 deletions

View File

@@ -68,3 +68,7 @@ export interface TypeTag<S extends string> {
export type PrefixTypeArray<T, TArr extends unknown[]> = [T, ...TArr]
export type SuffixTypeArray<TArr extends unknown[], T> = [...TArr, T]
export type TypeArraySignature<TArr extends unknown[], TReturn> = (...params: TArr) => TReturn
export type MethodsOf<T, TMethod = (...args: any[]) => any> = {
[K in keyof T]: T[K] extends TMethod ? K : never
}[keyof T]