/// /// declare namespace JSX { interface DjxIntrinsicAttributes { /** alias for className */ class: string; /** specifies the name of the property in the widget where the the * reference to the current object will be stored */ "data-dojo-attach-point": string; /** specifies handlers map for the events */ "data-dojo-attach-event": string; /** @deprecated */ [attr: string]: any; } interface DjxIntrinsicElements { } type RecursivePartial = T extends string | number | boolean | null | undefined | Function ? T : { [k in keyof T]?: RecursivePartial }; type MatchingMemberKeys = { [K in keyof T]: T[K] extends U ? K : never; }[keyof T]; type NotMatchingMemberKeys = { [K in keyof T]: T[K] extends U ? never : K; }[keyof T]; type ExtractMembers = Pick>; type ExcludeMembers = Pick>; type ElementAttrNames = NotMatchingMemberKeys any>; type ElementAttrType = K extends keyof E ? RecursivePartial : string; type ElementAttrNamesBlacklist = "children" | "getRootNode" | keyof EventTarget; /** This type extracts keys of the specified parameter E by the following rule: * 1. skips all ElementAttrNamesBlacklist * 2. skips all methods except with the signature of event handlers */ type AssignableElementAttrNames = { [K in keyof E]: K extends ElementAttrNamesBlacklist ? never : ((evt: Event) => any) extends E[K] ? K : E[K] extends ((...args: any[]) => any) ? never : K; }[keyof E]; type LaxElement = Pick> & DjxIntrinsicAttributes; type LaxIntrinsicElementsMap = { [tag in keyof HTMLElementTagNameMap]: LaxElement } & DjxIntrinsicElements; type IntrinsicElements = { [tag in keyof LaxIntrinsicElementsMap]: RecursivePartial; } }