import { oneElementOf } from "./oneElementOf.js";
import { oneEntryOf } from "./oneEntryOf.js";

//#region src/oneOf.d.ts

/**
 * Returns one random element from the array or one random entry from the object.
 *
 * For more specific functions, see `oneElementOf` and `oneEntryOf`.
 *
 * @example
 * ```ts
 * oneOf([1, 2, 3]); // 2
 * oneOf({ a: 1, b: 2, c: 3 }); // ['b', 2]
 * ```
 */
declare function oneOf<const A>(input: Parameters<typeof oneElementOf<A>>[0]): ReturnType<typeof oneElementOf<A>>;
declare function oneOf<const O extends Record<string | number | symbol, unknown>>(input: Parameters<typeof oneEntryOf<O>>[0]): ReturnType<typeof oneEntryOf<O>>;
//#endregion
export { oneOf };