You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jsakalos
changed the title
PresetManager method not declared as static in gantt.d.ts
PresetManager methods not declared as static in gantt.d.ts
Dec 29, 2019
This is deeper seated than I originally thought. The problem here is that for singletons we create instances of the classes but the documentation is written for class definitions. Typescript however, does not know that we have created the instance of the class and, because the methods are not originally static, it does not recognize the singleton methods.
In other words:
import { PresetManager } from 'bryntum-scheduler'; // imports PresetManager instance
PresetManager.registerLocale(...) // typescript thinks that we're working with the PresetManager class
Reported here: https://www.bryntum.com/forum/viewtopic.php?f=44&t=12958#p67760
PresetManager is a singleton but its methods are not declared as static in
gantt.d.ts
:The result is that TypeScript does not find these methods:
The text was updated successfully, but these errors were encountered: