-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Hello, many thanks for this library! 👍
I have an issue where the interfaces generated are not valid typescript code due to containing special characters. For instance:
export interface ModuleList {
mc?: string;
mc.json?: Array<ModuleCode>;
}This is not valid typescript code. Would it be possible to generate the following instead?
export interface ModuleList {
mc?: string;
"mc.json"?: Array<ModuleCode>;
}I naively solved this by modifying the schema partial to always output quotes, then running the generated file through prettier afterwards, but it is quite the hack:
{{#each properties}}
"{{@key}}"{{#unless (in? ../required @key)}}?{{/unless}}: {{> schema namespace=../namespace}};
{{/each}}Thanks! 🙂
Metadata
Metadata
Assignees
Labels
No labels