|
|
/// <reference path="./css.d.ts"/>
|
|
|
/// <reference path="./dijit.d.ts"/>
|
|
|
|
|
|
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;
|
|
|
|
|
|
[attr: string]: any;
|
|
|
}
|
|
|
|
|
|
interface DjxIntrinsicElements {
|
|
|
}
|
|
|
|
|
|
type RecursivePartial<T> = T extends string | number | boolean | null | undefined | Function ?
|
|
|
T :
|
|
|
{ [k in keyof T]?: RecursivePartial<T[k]> };
|
|
|
|
|
|
type MatchingMemberKeys<T, U> = {
|
|
|
[K in keyof T]: T[K] extends U ? K : never;
|
|
|
}[keyof T];
|
|
|
type NotMatchingMemberKeys<T, U> = {
|
|
|
[K in keyof T]: T[K] extends U ? never : K;
|
|
|
}[keyof T];
|
|
|
|
|
|
type ExtractMembers<T, U> = Pick<T, MatchingMemberKeys<T, U>>;
|
|
|
|
|
|
type ExcludeMembers<T, U> = Pick<T, NotMatchingMemberKeys<T, U>>;
|
|
|
|
|
|
type ElementAttrNames<E> = NotMatchingMemberKeys<E, (...args: any[]) => any>;
|
|
|
|
|
|
type ElementAttrType<E, K extends keyof any> = K extends keyof E ? RecursivePartial<E[K]> : string;
|
|
|
|
|
|
type LaxElement<E extends object> = ExcludeMembers<Omit<E, "children">, (...args: any[]) => any> & DjxIntrinsicAttributes;
|
|
|
|
|
|
type LaxIntrinsicElementsMap = {
|
|
|
[tag in keyof HTMLElementTagNameMap]: LaxElement<HTMLElementTagNameMap[tag]>
|
|
|
} & DjxIntrinsicElements;
|
|
|
|
|
|
type IntrinsicElements = {
|
|
|
[tag in keyof LaxIntrinsicElementsMap]: RecursivePartial<LaxIntrinsicElementsMap[tag]>;
|
|
|
}
|
|
|
}
|
|
|
|