@itwin/imodels-client-management
Version:
iModels API client wrapper for applications that manage iModels.
19 lines • 767 B
TypeScript
/** Generic dictionary with string keys. */
export interface Dictionary<T> {
[key: string]: T;
}
/** Wrapper type that makes all properties of `T` required recursively. */
export type RecursiveRequired<T> = Required<T> & {
[P in keyof T]: RecursiveRequired<T[P]>;
};
/** Wrapper type that makes all properties in `T` optional except for the one specified. */
export type OptionalExceptFor<T, TRequired extends keyof T> = Partial<T> & Pick<T, TRequired>;
/** Wrapper type that requires at least one property of `T` to be set. */
export type AtLeastOneProperty<T extends Record<string, any>> = {
[K in keyof T]: {
[P in K]: T[P];
} & {
[P in Exclude<keyof T, K>]?: never;
};
}[keyof T] | T;
//# sourceMappingURL=UtilityTypes.d.ts.map