I have a TypeScript class that I want to use in a DataSource for the schema.model property but also for initialising objects that are strongly typed in the rest of my TypeScript code. An example of such a class that seems to work is as follows:
However, having the properties defined twice, once for the call to kendo.data.Model.define and then again for the sake of the TypeScript class is not ideal. Is there a better way to do this?
The following would be better if it created the field definitions automatically, but unfortunately it doesn't:
Alternatively, is it possible to move the kendo.data.Model.define() call to inside the constructor?