/**
 * @file `glob` (async) and `globSync` — fast-glob wrappers with a
 *   `node:fs.glob` fast-path when the option surface lines up.
 *   `canUseNodeFsGlob` is the per-call gate. Trailing-slash workaround for
 *   fast-glob ignore patterns
 *   ───────────────────────────────────────────────────────── TL;DR: when you
 *   pass `ignore: ['**\/dist/']` to fast-glob, the `dist` directory still gets
 *   walked. Strip the trailing slash before passing it to fast-glob and the
 *   ignore actually takes effect. Why this exists ─────────────── The gitignore
 *   convention is to write directory entries with a trailing slash: `dist/`,
 *   `node_modules/`, `coverage/`. Tools that translate gitignore lines into
 *   glob patterns (including socket-cli's `globWithGitIgnore` helper,
 *   npm-packlist, etc.) preserve that slash. fast-glob has TWO independent
 *   filters that handle the trailing slash differently:
 *
 *   1. The DEEP filter decides whether to walk INTO a candidate directory. The
 *      deep filter compiles `**\/dist/` into a regex that requires a trailing
 *      slash on the input, but it tests `entryPath = 'dist'` (no slash, because
 *      readdir entries don't include one). So fast-glob walks in anyway.
 *   2. The ENTRY filter (post-walk) retries with a trailing slash appended for
 *      directory entries — so it correctly excludes the results, but only AFTER
 *      the entire subtree has been walked. Net effect: a `dist/` ignore pattern
 *      correctly removes contents from the result array, but only after
 *      walking. On a 300k-file `dist/` under tight memory this is the
 *      difference between "instant" and "OOM kill". Stripping the trailing
 *      slash makes it `**\/dist`, which both filters interpret correctly.
 */
import type { FastGlobOptions, Pattern } from './types';
/**
 * Whether the caller's option bag is fully expressible with `node:fs.glob`
 * (`cwd` + `exclude`). Any other option means we must fall back to fast-glob,
 * which exposes the wider surface.
 *
 * Exported for unit tests; not part of the public API.
 *
 * @internal
 */
export declare function canUseNodeFsGlob(options: FastGlobOptions | undefined): boolean;
/**
 * Asynchronously find files matching glob patterns.
 *
 * @example
 *   ;```typescript
 *   const files = await glob('src/*.ts', { cwd: '/tmp/project' })
 *   console.log(files) // ['src/index.ts', 'src/utils.ts']
 *   ```
 */
export declare function glob(patterns: Pattern | Pattern[], options?: FastGlobOptions): Promise<string[]>;
/**
 * Synchronously find files matching glob patterns. Wrapper around
 * fast-glob.sync.
 *
 * @example
 *   ;```typescript
 *   const files = globSync('*.json', { cwd: '/tmp/project' })
 *   console.log(files) // ['package.json', 'tsconfig.json']
 *   ```
 */
export declare function globSync(patterns: Pattern | Pattern[], options?: FastGlobOptions): string[];
