# @types/sharpie

> TypeScript definitions for sharpie

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

## Install

```sh
npm install @types/sharpie
pnpm add @types/sharpie
yarn add @types/sharpie
bun add @types/sharpie
```

## 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 | 4.5.6 |
| Published | 2023-11-07 |
| First published | 2020-10-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

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

## Dependencies (2)

- [@types/sharp](https://npm.io/package/@types/sharp.md) ^0.31.0
- [@types/express-serve-static-core](https://npm.io/package/@types/express-serve-static-core.md) *

## Recent versions

- 4.5.6 (latest) — 2023-11-07
- 4.5.3 (ts4.3) — 2023-05-25
- 4.5.1 (ts3.6) — 2021-07-06
- 4.5.0 (ts3.2) — 2020-10-15
- 4.5.5 — 2023-10-18
- 4.5.4 — 2023-09-25
- 4.5.2 — 2023-04-26

## README

# Installation
> `npm install --save @types/sharpie`

# Summary
This package contains type definitions for sharpie (https://github.com/kapouer/sharpie#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sharpie.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sharpie/index.d.ts)
````ts
import { RequestHandler } from "express-serve-static-core";
import sharpModule = require("sharp");

/**
 * A simple express middleware for resizing images using sharp and pipes.
 */
declare function sharpie(defaults: sharpie.SharpieOptions): RequestHandler;

declare namespace sharpie {
    interface SharpieOptions {
        format?: string | undefined;
        /** @default 'url' */
        param?: string | undefined;
        /** @default 90 */
        q?: number | undefined;
        /** @default 'w:2048,h:2048,max' */
        rs?: string | undefined;
        /** @default false */
        bg?: string | boolean | undefined;
        /** @default false */
        fg?: string | boolean | undefined;
        /** @default 'center' */
        crop?: string | undefined;
        /** @default false */
        flatten?: boolean | undefined;
        /** @default false */
        style?: boolean | undefined;
        /** @default 'xMinYMin' */
        ratio?: string | undefined;
        /** @default undefined */
        mean?: string | undefined;
        /**
         * whitelist hostnames that sharpie can proxy
         * @default false
         */
        hostnames?:
            | false
            | string[]
            | {
                [hostname: string]: boolean;
            }
            | ((hostname: string) => boolean)
            | undefined;
        /**
         * Since version 3.4 it is possible to use imagemagick to convert to ico file format
         */
        im?: string | undefined;
        /**
         * the sizes of the favicon in ico format, separated by a comma
         * @default '64,32,16'
         */
        sizes?: string | undefined;
        signs?: {
            /**  use ~ for better uri-encoding */
            assignment?: string | undefined;
            /** use ! for better uri-encoding */
            separator?: string | undefined;
        } | undefined;
    }

    interface SharpieFormats {
        src: { [format: string]: true };
        dst: { [format: string]: true };
    }

    const formats: SharpieFormats;
    const sharp: typeof sharpModule;
}

export = sharpie;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/sharp](https://npmjs.com/package/@types/sharp)

# Credits
These definitions were written by [Piotr Błażejewicz](https://github.com/peterblazejewicz).

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