csharp-models-to-typescript
csharp-models-to-typescript copied to clipboard
Custom type Translation from byte[] isn't working
I can't convert the type byte[] to another type, causing my typescript file to output incorrect types.
Example:
Config file:
{
"customTypeTranslations": {
"byte[]" : "string"
}
}
Source c# file:
public class Test {
public string Name { get; set; }
public byte[] Data { get; set; }
}
output typescript file content:
export interface Test {
name: string;
data: byte[] //should be string
}
I've created another custom type translations, like TimeSpan to string and even KeyValuePair<string, string> to { key: string; value: string; } and it worked file, but byte[] to string isn't working.
Any ideias on this?
Thanks in advance.
I want to convert byte[] as ArrayBuffer and the customTypeTranslations is not working.
Will the PR #43 be accepted? Or should the conversion set byte[] as ArrayBuffer directly?