@mdast2docx/image
Version:
MDAST to DOCX plugin for resolving and embedding images. Supports base64, URLs, and custom resolvers for seamless DOCX image integration.
8 lines (7 loc) • 318 B
TypeScript
/**
* Makes all properties in T optional recursively, with special handling for functions.
* This utility type preserves function signatures while making them optional.
*/
export type Optional<T> = {
[K in keyof T]?: T[K] extends (...args: any[]) => any ? T[K] : T[K] extends object ? Optional<T[K]> : T[K];
};