##// END OF EJS Templates
_WidgetBase some attributes made optional
_WidgetBase some attributes made optional

File last commit:

r18:8ab7be820af9 v1.0.7 default
r18:8ab7be820af9 v1.0.7 default
Show More
_WidgetTests.ts
59 lines | 1.1 KiB | video/mp2t | TypeScriptLexer
cin
Added events map support to _WidgetBase, corrected attributes map support in _WidgetBase
r2 import * as _WidgetBase from "dijit/_WidgetBase";
import { watch } from "./traits";
cin
updated _WidgetBase typings, added support for the generic type parameter to the constructor
r1
interface ScheduleWidgetAttrs {
data: string[];
}
cin
Added events map support to _WidgetBase, corrected attributes map support in _WidgetBase
r2 interface ScheduleWidgetEvents {
"scheduled": Event & {
detail: {
startDate: Date,
endDate: Date
}
};
}
cin
updated _WidgetBase typings, added support for the generic type parameter to the constructor
r1
cin
some fixes after testing
r5 class ScheduleWidget extends _WidgetBase<ScheduleWidgetAttrs, ScheduleWidgetEvents> {
cin
updated _WidgetBase typings, added support for the generic type parameter to the constructor
r1 data: string[];
cin
some fixes after testing
r5
_onClick() {
cin
_WidgetBase some attributes made optional
r18 this.set("data", ["", ""]);
cin
some fixes after testing
r5
const t = this.get("title");
this.set({
data: ["",""]
});
}
render(){
watch(this, "title", v => String(v) );
}
cin
updated _WidgetBase typings, added support for the generic type parameter to the constructor
r1 }
const w = new ScheduleWidget({title: "Year schedule", data: ["a", "b"] });
cin
Added events map support to _WidgetBase, corrected attributes map support in _WidgetBase
r2 w.get("data");
cin
_WidgetBase some attributes made optional
r18 w.set("data", ["a","b"]);
cin
some fixes after testing
r5 w.set({
data: ["a", "b"]
});
cin
Added events map support to _WidgetBase, corrected attributes map support in _WidgetBase
r2 w.watch((p, o, n) => [p,o,n]);
w.watch("data", (p, o, n) => [p,o,n]);
watch(w, "title", v => String(v) );
watch(w, "data", v => String(v) );
w.emit("scheduled", { detail: { startDate: new Date(), endDate: new Date()} });
w.emit("click", {} );
w.emit("click", {} );
cin
added type parameter to Evented<T>, T is the event map...
r10 w.emit<any>("some-extra-event", {});
cin
Added events map support to _WidgetBase, corrected attributes map support in _WidgetBase
r2
w.on("click", e => e);
cin
added type parameter to Evented<T>, T is the event map...
r10 w.on<any>("some-extra-event", e => e);