So long as you use only string keys you can completely replace YAML with JSON (i.e. you can write JSON to a YAML file). Just make a .d.ts for your config schema and you're done.
Avoiding YAML is this way has saved my sanity on more than one occasion.
Avoiding YAML is this way has saved my sanity on more than one occasion.