# Installation
> `npm install --save @types/ghost-storage-base`

# Summary
This package contains type definitions for ghost-storage-base (https://github.com/TryGhost/Ghost-Storage-Base).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ghost-storage-base.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ghost-storage-base/index.d.ts)
````ts
import { Handler } from "express";

declare namespace StorageBase {
    interface Image {
        path: string;
        name: string;
        type: string;
    }

    interface ReadOptions {
        path: string;
    }
}

declare abstract class StorageBase {
    constructor();

    abstract exists(fileName: string, targetDir?: string): Promise<boolean>;
    abstract save(image: StorageBase.Image, targetDir?: string): Promise<string>;
    abstract serve(): Handler;
    abstract delete(fileName: string, targetDir?: string): Promise<boolean>;
    abstract read(options?: StorageBase.ReadOptions): Promise<Buffer>;

    getTargetDir(baseDir?: string): string;
    getUniqueFileName(image: StorageBase.Image, targetDir: string): string;
    getSanitizedFileName(fileName: string): string;
}

export = StorageBase;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express)

# Credits
These definitions were written by [Demian](https://github.com/thde).
