/**
 * @file `envAsString` — coerce an env-var-shaped value into a string. Defaults
 *   to trimming whitespace; `trim: false` preserves the value as-is. Positional
 *   second argument is back-compat for the legacy `defaultValue` form.
 */
import type { EnvAsStringOptions } from './types';
/**
 * Convert an environment variable value to a string.
 *
 * Back-compat overload: passing a bare string as the second argument is
 * equivalent to `{ defaultValue: S }`.
 *
 * @example
 *   ;```typescript
 *   import { envAsString } from '@socketsecurity/lib/env/string'
 *
 *   envAsString('  hello  ') // 'hello' (trimmed)
 *   envAsString('  hello  ', { trim: false }) // '  hello  '
 *   envAsString(undefined) // ''
 *   envAsString(null, 'n/a') // 'n/a' (legacy positional)
 *   ```
 *
 * @param value - The value to convert.
 * @param defaultValueOrOptions - Default (string) or options object.
 *
 * @returns The string value, or the default value
 */
export declare function envAsString(value: unknown, defaultValueOrOptions?: string | EnvAsStringOptions | undefined): string;
