|
|
|
|
|
by bsingh4
2407 days ago
|
|
Why is every single property of type string - to see what to put there I have to reference a comment in code? I shouldn't have to read comments to see what the magic string is for the f1-micro tier, or the hard disk type or the region. CDK has actual Enums for all of these things that work to make life easier. You're not making it any easier to code up a DatabaseInstance - its simply a bucket of keys and values where I'm looking up what those values should be. |
|
And, to the specific point: you absolutely should not have to look up the docs. These values definitely will autocomplete.
Anyway, aside from all that, unions of strings is "the idiomatic way" to do this sort of thing in TypeScript and JavaScript.
[1]: https://www.typescriptlang.org/docs/handbook/advanced-types....