csharp-models-to-typescript
csharp-models-to-typescript copied to clipboard
Force custom translation if any before parse checks
Force the custom translation defined by the user before perfoming other checks.
There are some problems when the user tries to custom translate an C# Array to a javascript type.
I've trying to custom translate byte[]
to string
, but it ended up translating it to string[]
.
I had similar problems trying to translate Model[]
to AnotherModel[]
.
My config-file.json at "customTypeTranslations" was sometinh like this:
{
"byte[]": "string",
"Model[]": "AnotherModel[]"
}
In this case, I'm assuming that the dev knows what he's doing when he, by adding a custom translation, chooses to translate, for example, and array of Model
to an array of AnotherModel
.
Closes #33