pub fn user_scratch_path(
environment: &[(OsString, OsString)],
) -> Result<PathBuf, String>Expand description
What: The per-user scratch directory’s path, or the sentence that says what the environment lacks. Nothing is created. Why: Callers that run without a repository learn the location first and create it only when they need it, so a command with nothing to write never touches the disk.
In TS you’d write (pseudocode):
function userScratchPath(env): string; // throws string