use without module loading system
It would be awesome if TypedJSON could be used without requiring a module-loading system. If this is considered, the code should be made compatible for global use, for example by including fake AMD fallback functionality that is a wrapper for global injection. This would be accompanied by global type-definitions as well.
This would allow using TypedJSON with namespace syntax, bypassing the requirement of a module-loading system:
@TypedJSON.JsonObject
class Person {
@TypedJSON.JsonMember
firstName: string;
@TypedJSON.JsonMember
lastName: string;
}
var john = TypedJSON.TypedJSON.parse('{ "firstName": "John", "lastName": "Doe" }', Person);
The double TypedJSON is a bit meh, but this would be a secondary, fallback functionality. The preferred way of importing TypedJSON is the ES6 syntax anyways, which is inherently accompanied by a module loading system.
I would like to ask if this option to use this plugin without module loading system will be available in near future. It will be really nice. Thank you for some informations