##// END OF EJS Templates
created typings for basic part of dojo and dijit further work is required to...
created typings for basic part of dojo and dijit further work is required to complete typings and separate them from this project dojo-typings replaced with @type/dojo, @type/dijit.

File last commit:

r2:8ec37bf1b4d1 default
r2:8ec37bf1b4d1 default
Show More
traits.ts
30 lines | 848 B | video/mp2t | TypeScriptLexer
cin
Initial commit, copied files related to .tsx scripts support.
r0 import _WidgetBase = require("dijit/_WidgetBase");
cin
created typings for basic part of dojo and dijit further work is required to...
r2 import { _WidgetBaseConstructor } from "dijit/_WidgetBase";
cin
Initial commit, copied files related to .tsx scripts support.
r0
export interface BuildContext {
getDomElement(): HTMLElement;
}
export function isNode(el: any): el is HTMLElement {
return el && el.nodeName && el.nodeType;
}
export function isWidget(v: any): v is _WidgetBase {
return v && "domNode" in v;
}
export function isBuildContext(v: any): v is BuildContext {
return typeof v === "object" && typeof v.getDomElement === "function";
}
export function isPlainObject(v: object) {
if (typeof v !== "object")
return false;
const vp = Object.getPrototypeOf(v);
return !vp || vp === Object.prototype;
}
export function isWidgetConstructor(v: any): v is _WidgetBaseConstructor {
return typeof v === "function" && v.prototype && "domNode" in v.prototype;
}