CamelCase option
msummers-nr opened this issue · 3 comments
For JSII compatibility it would be handy to have a flag that enforces camelCase for methods and properties.
I just published an internal fork and added CamelCase support as typescriptify is useful for CDK8s/CDKTF construct library generation with JSII support (which is only possible in TS, while most k8s controllers / TF providers are written in golang).
Docs here:
https://github.com/GoodNotes/typescriptify-golang-structs?tab=readme-ov-file#upstream-golang-structs
The utility functions I added to work with upstream golang structs aren't ideal and if I find the time I'd rather re-write the functionality as suggested here:
GoodNotes#1
I wouldn't mind upstreaming these
FYI, as part of my CDK/CDKTF/CDK8s I bundle the popular decamelize/.. npm packages converting the TS object back to JSON with the right fieldNames ... I did not test Typescriptify Class generation to handle serialization to and from the original golang struct json tags.
Ah, good to know (about decamelize).
I ended-up abandoning Go and have written TypeScript that generates JSII compliant TypeScript from a GraphQL Schema.
Now I'm working on generating working Constructs, we'll see.