/**
 * @file `envAsNumber` — coerce an env-var-shaped value into a number. `mode:
 *   'int'` uses `parseInt(_, 10)`; `mode: 'float'` uses `Number()`. Non-finite
 *   results round-trip through `defaultValue` unless `allowInfinity: true` is
 *   set.
 */
import type { EnvAsNumberOptions } from './types';
/**
 * Convert an environment variable value to a number.
 *
 * Back-compat overload: passing a bare number as the second argument is
 * equivalent to `{ defaultValue: N }`.
 *
 * @example
 *   ;```typescript
 *   import { envAsNumber } from '@socketsecurity/lib/env/number'
 *
 *   envAsNumber('3000') // 3000 (int mode)
 *   envAsNumber('3.14', { mode: 'float' }) // 3.14
 *   envAsNumber('abc') // 0
 *   envAsNumber(undefined, 42) // 42 (legacy positional default)
 *   ```
 *
 * @param value - The value to convert.
 * @param defaultValueOrOptions - Default (number) or options object.
 *
 * @returns The parsed number, or the default value if parsing fails
 */
export declare function envAsNumber(value: unknown, defaultValueOrOptions?: number | EnvAsNumberOptions | undefined): number;
