In C# I have the model that contains:
public class MyDTO {
public byte[] Timestamp { get; set; }
}
When I run npx get-dtos typescript https://localhost:5001, I get the next generated DTO:
export class MyDTO {
public timestamp: string = [];
}
It converted byte array into base64 string correctly, however it added = [], which is not right.
The type of property is string, not string[]. It reports typescript error: Type 'undefined[]' is not assignable to type 'string'.ts(2322)
So it is expected to be:
export class MyDTO {
public timestamp: string;
}
In C# I have the model that contains:
When I run
npx get-dtos typescript https://localhost:5001, I get the next generated DTO:It converted byte array into base64 string correctly, however it added
= [], which is not right.The type of property is
string, notstring[]. It reports typescript error:Type 'undefined[]' is not assignable to type 'string'.ts(2322)So it is expected to be: