##// END OF EJS Templates
Working on IntrisictElements to support legacy and new tsx styles
Working on IntrisictElements to support legacy and new tsx styles

File last commit:

r40:ac3004768754 default
r40:ac3004768754 default
Show More
index.d.ts
34 lines | 1.1 KiB | video/mp2t | TypeScriptLexer
/// <reference path="./css.d.ts"/>
/// <reference path="./dijit.d.ts"/>
declare namespace JSX {
interface DjxIntrinsicAttributes {
class: string;
"data-dojo-attach-point": string;
"data-dojo-attach-event": string;
}
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 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> = E & { }
type LegacyElementAttributes<E> = {
[attr in ElementAttrNames<E>]?: ElementAttrType<E, attr>;
} | Partial<DjxIntrinsicAttributes>;
interface IntrinsicElements {
[tag: keyof HTMLElementTagNameMap]: LegacyElementAttributes<HTMLElementTagNameMap[tag]>;
}
}