mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
12 lines
356 B
TypeScript
12 lines
356 B
TypeScript
export type WithoutChild<T> = T extends { child?: unknown }
|
|
? Omit<T, "child">
|
|
: T;
|
|
|
|
export type WithoutChildren<T> = T extends { children?: unknown }
|
|
? Omit<T, "children">
|
|
: T;
|
|
export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;
|
|
export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & {
|
|
ref?: U | null;
|
|
};
|