Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom type Translation from byte[] isn't working #33

Open
vanilsonbr opened this issue Aug 28, 2019 · 1 comment · May be fixed by #43
Open

Custom type Translation from byte[] isn't working #33

vanilsonbr opened this issue Aug 28, 2019 · 1 comment · May be fixed by #43

Comments

@vanilsonbr
Copy link

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.

@vanilsonbr vanilsonbr linked a pull request Jul 5, 2020 that will close this issue
@digocesar
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants