/** * @file `envAsString` — coerce an env-var-shaped value into a string via an * options bag (`defaultValue`, `trim`). Defaults to trimming whitespace; * `trim: false` preserves the value as-is. */ import type { EnvAsStringOptions } from './types.js'; /** * Convert an environment variable value to a string. * * @example * ;```typescript * import { envAsString } from '@socketsecurity/lib/env/string' * * envAsString(' hello ') // 'hello' (trimmed) * envAsString(' hello ', { trim: false }) // ' hello ' * envAsString(undefined) // '' * envAsString(null, { defaultValue: 'n/a' }) // 'n/a' * ``` * * @param value - The value to convert. * @param options - Options bag: `defaultValue`, `trim`. * * @returns The string value, or the default value */ export declare function envAsString(value: unknown, options?: EnvAsStringOptions | undefined): string;