# @types/gulp-if

> TypeScript definitions for gulp-if

Latest version **3.0.5** (published 2025-07-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/gulp-if
pnpm add @types/gulp-if
yarn add @types/gulp-if
bun add @types/gulp-if
```

## 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 | 3.0.5 |
| Published | 2025-07-01 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

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

## Dependencies (3)

- [@types/node](https://npm.io/package/@types/node.md) *
- [@types/minimatch](https://npm.io/package/@types/minimatch.md) <=5
- [@types/gulp-match](https://npm.io/package/@types/gulp-match.md) *

## Recent versions

- 3.0.5 (latest) — 2025-07-01
- 3.0.4 (ts4.5) — 2023-11-07
- 3.0.1 (ts4.3) — 2023-05-10
- 3.0.0 (ts4.2) — 2023-02-10
- 0.0.34 (ts3.6) — 2021-07-08
- 0.0.33 (ts2.0) — 2017-11-08
- 3.0.3 — 2023-10-18
- 3.0.2 — 2023-09-20
- 0.0.32 — 2017-08-21
- 0.0.31 — 2017-03-16
- 0.0.30 — 2016-09-19
- 0.0.29 — 2016-07-14
- 0.0.28-alpha — 2016-07-08
- 0.0.26-alpha — 2016-07-04
- 0.0.25-alpha — 2016-07-02
- … 6 more at https://npm.io/package/@types/gulp-if/versions

## README

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

import gulpMatch = require("gulp-match");
import minimatch = require("minimatch");

/**
 * gulp-if will pipe data to stream whenever condition is truthy.
 * If condition is falsey and elseStream is passed, data will pipe to elseStream
 * After data is piped to stream or elseStream or neither, data is piped down-stream.
 *
 * @param condition whether input should be piped to stream
 * @param stream the stream to pipe to if condition is true
 * @param elseStream (optional) the stream to pipe to if condition is false
 * @param minimatchOptions (optional) the minimatch options when matching glob conditions
 */
declare function gulpIf(
    condition: gulpMatch.MatchCondition,
    stream: NodeJS.ReadWriteStream,
    elseStream?: NodeJS.ReadWriteStream,
    minimatchOptions?: minimatch.IOptions,
): NodeJS.ReadWriteStream;

export = gulpIf;

````

### Additional Details
 * Last updated: Tue, 01 Jul 2025 21:02:17 GMT
 * Dependencies: [@types/gulp-match](https://npmjs.com/package/@types/gulp-match), [@types/minimatch](https://npmjs.com/package/@types/minimatch), [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Asana](https://asana.com), and [Joe Skeen](https://github.com/joeskeen).

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