##// END OF EJS Templates
Добавлена метка v1.0.0-rc1 для набора изменений 1e22cac2aaf4
Добавлена метка v1.0.0-rc1 для набора изменений 1e22cac2aaf4

File last commit:

r2:1e22cac2aaf4 v1.0.0-rc1 default
r3:0b28c6ab359f default
Show More
_WidgetTests.ts
41 lines | 863 B | 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
Added events map support to _WidgetBase, corrected attributes map support in _WidgetBase
r2 declare class ScheduleWidget extends _WidgetBase<ScheduleWidgetAttrs, ScheduleWidgetEvents> {
cin
updated _WidgetBase typings, added support for the generic type parameter to the constructor
r1 data: string[];
}
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");
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", {} );
w.emit("some-extra-event", {});
w.on("click", e => e);
w.on("some-extra-event", e => e);