# @types/glob-stream

> TypeScript definitions for glob-stream

Latest version **8.0.3** (published 2025-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/glob-stream
pnpm add @types/glob-stream
yarn add @types/glob-stream
bun add @types/glob-stream
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 8.0.3 |
| Published | 2025-05-05 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51434 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/glob-stream
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/glob-stream
- npm.io page: https://npm.io/package/@types/glob-stream

## Dependencies (3)

- [@types/node](https://npm.io/package/@types/node.md) *
- [@types/streamx](https://npm.io/package/@types/streamx.md) *
- [@types/picomatch](https://npm.io/package/@types/picomatch.md) *

## Recent versions

- 8.0.3 (latest) — 2025-05-05
- 8.0.2 (ts4.5) — 2023-11-07
- 8.0.0 (ts4.4) — 2023-05-10
- 6.1.1 (ts3.6) — 2021-07-06
- 6.1.0 (ts3.3) — 2017-12-03
- 8.0.1 — 2023-10-18
- 6.1.3 — 2023-05-10
- 6.1.2 — 2023-04-12
- 3.1.31 — 2017-08-21
- 3.1.30 — 2016-09-19
- 3.1.29 — 2016-07-14
- 3.1.28-alpha — 2016-07-08
- 3.1.26-alpha — 2016-07-04
- 3.1.25-alpha — 2016-07-02
- 3.1.24-alpha — 2016-07-01
- … 5 more at https://npm.io/package/@types/glob-stream/versions

## README

# Installation
> `npm install --save @types/glob-stream`

# Summary
This package contains type definitions for glob-stream (https://github.com/wearefractal/glob-stream).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/glob-stream.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/glob-stream/index.d.ts)
````ts
/// <reference types="node" />

import { PicomatchOptions } from "picomatch";
import { Readable } from "streamx";

declare function globStream(glob: string | string[]): Readable<globStream.Entry>;
declare function globStream(glob: string | string[], options: globStream.Options): Readable<globStream.Entry>;

declare namespace globStream {
    export interface Entry {
        cwd: string;
        base: string;
        path: string;
    }

    export type UniqueByStringPredicate = keyof Entry;
    export type UniqueByFunctionPredicate = (entry: Entry) => string;

    // Here, the settings interface provided by `picomatch` is used rather than the `anymatch` one's.
    // This is due to the fact that `anymatch` redirects its options to `picomatch`.
    // Furthermore, `anymatch`s type declaration of the `picomatch` options is hand-written and describes some of the available options incorrectly.
    export interface Options extends PicomatchOptions {
        /**
         * Whether or not to error upon an empty singular glob.
         */
        allowEmpty?: boolean | undefined;
        /**
         * The current working directory that the glob is resolved against.
         */
        cwd?: string | undefined;
        /**
         * The root path that the glob is resolved against.
         */
        root?: string | undefined;
        /**
         * The absolute segment of the glob path that isn't a glob. This value is attached
         * to each glob object and is useful for relative pathing.
         */
        base?: string | undefined;
        /**
         * Whether or not the {@linkcode cwd} and {@linkcode base} should be the same.
         */
        cwdbase?: boolean | undefined;
        /**
         * Filters stream to remove duplicates based on the string property name or the result of function.
         * When using a function, the function receives the streamed
         * data (objects containing `cwd`, `base`, `path` properties) to compare against.
         */
        uniqueBy?: UniqueByStringPredicate | UniqueByFunctionPredicate | undefined;
    }
}

export = globStream;

````

### Additional Details
 * Last updated: Mon, 05 May 2025 19:02:21 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/picomatch](https://npmjs.com/package/@types/picomatch), [@types/streamx](https://npmjs.com/package/@types/streamx)

# Credits
These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), and [mrmlnc](https://github.com/mrmlnc).

---
_Source: https://npm.io/package/@types/glob-stream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
