shelving
Version:
Toolkit for using data in JavaScript.
10 lines (9 loc) • 313 B
TypeScript
import type { ReactNode } from "react";
/** Props for a component that requires `children`. */
export interface ChildProps {
readonly children: ReactNode;
}
/** Props for a component that optionally accepts `children`. */
export interface OptionalChildProps {
readonly children?: ReactNode | undefined;
}