Given the following input JTD:
{
"properties": {
"a": {"type": "string"},
"b": {"enum": ["", "x", "y"]}
}
}
jtd-codegen with the --typescript-out flag generates the following output:
// Code generated by jtd-codegen for TypeScript v0.2.0
export enum SimpleB {
= "",
X = "x",
Y = "y",
}
export interface Simple {
a: string;
b: SimpleB;
}
However, the line = "" with nothing before the equals sign is rejected by the typescript compiler as a syntax error.
jtd-codegen should either reject the input if I'm misunderstanding something and this is not valid JTD, or it should emit typescript which does not cause the typescript compiler to complain.