# @types/gulp-sort

> TypeScript definitions for gulp-sort

Latest version **2.0.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 45/100 (D)** — status: abandoned.

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

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

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

## Dependencies (2)

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

## Recent versions

- 2.0.4 (latest) — 2023-11-07
- 2.0.1 (ts4.3) — 2023-05-10
- 2.0.0 (ts3.7) — 2021-09-18
- 0.0.33 (ts3.6) — 2021-07-08
- 0.0.32 (ts2.0) — 2017-11-09
- 2.0.3 — 2023-10-18
- 2.0.2 — 2023-09-20
- 0.0.31 — 2017-08-21
- 0.0.30 — 2017-03-16
- 0.0.29 — 2016-09-19
- 0.0.28 — 2016-07-14
- 0.0.27-alpha — 2016-07-08
- 0.0.26-alpha — 2016-07-04
- 0.0.25-alpha — 2016-07-02
- 0.0.24-alpha — 2016-07-01
- … 5 more at https://npm.io/package/@types/gulp-sort/versions

## README

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

/** Sort files in stream by path or any custom sort comparator */

import gulpUtil = require("gulp-util");

interface IOptions {
    /**
     * A function to compare two files.
     * Returns:
     * -1 if file1 should be before file2,
     * 0 if file1 is equivalent to file2, and
     * 1 if file1 should be after file2
     */
    comparator?: IComparatorFunction | undefined;
    /** Whether to sort in ascending order, default is true */
    asc?: boolean | undefined;
    /** Whether to use a custom sort function. */
    customSortFn?: (files: gulpUtil.File[], comparator?: IComparatorFunction) => gulpUtil.File[];
}

interface IComparatorFunction {
    /**
     * A function to compare two files.
     * Returns:
     * -1 if file1 should be before file2,
     * 0 if file1 is equivalent to file2, and
     * 1 if file1 should be after file2
     */
    (file1: gulpUtil.File, file2: gulpUtil.File): number;
}

/** Sort files in stream by path or any custom sort comparator */
declare function gulpSort(): NodeJS.ReadWriteStream;
declare function gulpSort(comparator: IComparatorFunction): NodeJS.ReadWriteStream;
declare function gulpSort(options: IOptions): NodeJS.ReadWriteStream;

declare namespace gulpSort {}

export = gulpSort;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: [@types/gulp-util](https://npmjs.com/package/@types/gulp-util), [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Joe Skeen](https://github.com/joeskeen).

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