You can use the dhtmlxScheduler library together with TypeScript. All the TypeScript definitions are stored in the dhtmlxscheduler.d.ts file.
By using Scheduler with TypeScript you will get useful suggestions while working in any modern IDE. Besides, it guarantees the stability of code, since the used types will be constantly checked.
dhtmlxscheduler.js declares two global variables you may need: window.scheduler and window.Scheduler:
Since dhtmlxscheduler.js is a regular browser JS library, it can't export TypeScript modules explicitly. Thus, "scheduler" (or "Scheduler") has to be declared in TypeScript manually, so that you could refer to them without a compiler error. There are two possible ways for this:
declare let scheduler: any;
Thus you won't have any error during compilation, and at the runtime your code will refer to the global Scheduler instance, making everything work as expected.Back to top