# @types/flat

> TypeScript definitions for flat

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

## Install

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

## 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 | 5.0.5 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51429 |
| Maintainers | types |

## Links

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

## Recent versions

- 5.0.5 (latest) — 2023-11-07
- 5.0.2 (ts3.6) — 2021-07-06
- 5.0.1 (ts3.0) — 2020-05-15
- 5.0.0 (ts2.8) — 2020-03-02
- 0.0.28 (ts2.0) — 2016-09-19
- 5.0.4 — 2023-10-18
- 5.0.3 — 2023-09-14
- 0.0.27 — 2016-07-14
- 0.0.26-alpha — 2016-07-08
- 0.0.25-alpha — 2016-07-04
- 0.0.24-alpha — 2016-07-02
- 0.0.23-alpha — 2016-07-01
- 0.0.22-alpha — 2016-07-01
- 0.0.21-alpha — 2016-05-25
- 0.0.20-alpha — 2016-05-20
- … 2 more at https://npm.io/package/@types/flat/versions

## README

# Installation
> `npm install --save @types/flat`

# Summary
This package contains type definitions for flat (https://github.com/hughsk/flat).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/flat.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/flat/index.d.ts)
````ts
declare var flatten: FlatTypes.Flatten;

export = flatten;

declare namespace FlatTypes {
    interface FlattenOptions {
        delimiter?: string | undefined;
        safe?: boolean | undefined;
        maxDepth?: number | undefined;
        transformKey?: ((key: string) => string) | undefined;
    }

    interface Flatten {
        <TTarget, TResult>(
            target: TTarget,
            options?: FlattenOptions,
        ): TResult;

        flatten: Flatten;
        unflatten: Unflatten;
    }

    interface UnflattenOptions {
        delimiter?: string | undefined;
        object?: boolean | undefined;
        overwrite?: boolean | undefined;
        transformKey?: ((key: string) => string) | undefined;
    }

    interface Unflatten {
        <TTarget, TResult>(
            target: TTarget,
            options?: UnflattenOptions,
        ): TResult;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [ Ilya Mochalov](https://github.com/chrootsu), and [Oz Weiss](https://github.com/thewizarodofoz).

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