MakeTypes icon indicating copy to clipboard operation
MakeTypes copied to clipboard

Make TypeScript types and proxy objects from example JSON objects. Can use proxy objects to dynamically type check JSON at runtime.

Results 18 MakeTypes issues
Sort by recently updated
recently updated
newest added

Some upstream converters from XML to Json, drop the array when it holds only one object. I notice that `[{ "Eg": 0 }, [{"Eg": 1}] ]` produces the correct output....

Implementation for https://github.com/jvilk/MakeTypes/issues/10 This code allows multiple input, making the following input to work: ```bash # Original functionality still working as before, accepting a json array or object make_types [optons]...

This PR is a bit of a grab bag: I don't know if you'll want all of these changes as is or not. Part of this is similar to #11...

This adds an API so that the Shape can generated by the caller using `d2s` and then customised prior to being emitted. For example, one can mark all fields as...

I want to provide multiple samples, but they are in separate files. Right now I am pre-processing to join the files, but would be very helpful to have this feature.

enhancement
help wanted

I am not sure typescript do now exports the interfaces, but imagine the following: ```ts @DynamicCast({class: AnInterface}) json : AnInterface; ``` It would throw an exception if the casting failed,...

What's a good way to have decent error messages without adding too much overhead / context tracking embedded in the JSON objects?

enhancement

Could we get literal string support? ![image](https://github.com/jvilk/MakeTypes/assets/38708022/a086b5f8-a020-466c-ac8b-e0525795b790) In this example, I would want `key` to be a string literal ``` {"objecte":[{"key":"dwdwdw"},{"key":"fffr"}]} ```