writeConfigFile
writeConfigFile(
file,config):Promise<void>
Write a configuration file: known keys in schema order, unknown keys after them in the order they already had, two-space indent, trailing newline. Parent directories are created.
The order is fixed so that writing an unchanged document produces an unchanged file — a config under version control should not churn its diff because a key moved.
Accepts a raw record as well as a TaskConfig, which is what makes the unknown-key-preserving edit path writable.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
file | string |
config | Record<string, unknown> | TaskConfig |
Returns
Section titled “Returns”Promise<void>