@mongodb-js/charts-embed-dom
Version:
JavaScript library for embedding MongoDB Charts
10 lines (9 loc) • 649 B
TypeScript
import type { Properties as CSSProperties } from 'csstype';
type KeysWithType<Target, Type> = {
[P in keyof Target]: Target[P] extends Type ? P : never;
}[keyof Target];
type ExtractWithType<Target, Type> = Pick<Target, Extract<keyof Target, KeysWithType<Target, Type>>>;
export declare function createElement<TagName extends keyof HTMLElementTagNameMap, Element extends HTMLElementTagNameMap[TagName], ElementAttributes extends ExtractWithType<Element, string | boolean | Function | null>>(name: TagName, props?: Partial<ElementAttributes> & {
style?: CSSProperties;
}, children?: string | HTMLElement | HTMLElement[]): Element;
export {};