13 lines
682 B
TypeScript
13 lines
682 B
TypeScript
type Tail<T extends any[]> = ((...args: T) => any) extends (arg: any, ...rest: infer U) => any ? U : never;
|
|
export type ArgsWithoutConfig<F extends (...args: any[]) => any> = Tail<Parameters<F>>;
|
|
export type FuncWithoutConfigArg<F extends (...args: any[]) => any> = (...args: ArgsWithoutConfig<F>) => ReturnType<F>;
|
|
export declare const getInitials: (name: string) => string;
|
|
/**
|
|
* there are edge cases in the Splid API where it will return multiple copies of the same entry, which is not desired.
|
|
*
|
|
* this function de-duplicates these entries by their `GlobalId`.
|
|
*/
|
|
export declare const dedupeByGlobalId: <T extends {
|
|
GlobalId: string;
|
|
}>(entries: T[]) => T[];
|
|
export {};
|