envkey icon indicating copy to clipboard operation
envkey copied to clipboard

Missing docs for Options in node sdk

Open sergeysolovev opened this issue 9 months ago • 2 comments

Hello,

it would be amazing (for better DX) to have a few words about each setting using basic JSDoc. I would say the required minimum is to specify the default value of nullable fields (all of them are nullable). Otherwise it’s difficult to say, how shouldCache (and alike) works if I don’t pass anything.

export type Options = {
  /** ... */
  permitted?: string[];
  /** ... */
  shouldCache?: boolean;
  dotEnvFile?: string;
  memCache?: boolean;
  cwd?: string;
  onChange?: (
    updatedEnv: Record<string, string>,
    previousEnv: Record<string, string>,
    keysUpdated: string[]
  ) => void;
};

sergeysolovev avatar Sep 16 '23 10:09 sergeysolovev