@itsmworkbench/utils
Version:
The usual utility functions
22 lines (21 loc) • 432 B
TypeScript
export type IdAnd<T> = {
id: string;
item: T;
};
export type IdNameAnd<T> = IdAnd<T> & {
name: string;
};
export type IdAndName = {
id: string;
name: string;
};
export interface SelectedAndList<T extends IdAndName> {
options: IdAndName[];
selected?: string;
item?: T;
}
export type KeyAndPath = {
key: string;
path: string;
};
export declare function findIdKeyAndPath(s: string): KeyAndPath;