# @types/mysql-import

> TypeScript definitions for mysql-import

Latest version **5.0.1** (published 2024-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/mysql-import
pnpm add @types/mysql-import
yarn add @types/mysql-import
bun add @types/mysql-import
```

## Health

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

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.0.1 |
| Published | 2024-01-29 |
| First published | 2019-10-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 51420 |
| Maintainers | types |

## Links

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

## Dependencies (1)

- [mysql2](https://npm.io/package/mysql2.md) ^2.3.3

## Recent versions

- 5.0.1 (latest) — 2024-01-29
- 2.0.3 (ts4.5) — 2023-11-07
- 2.0.1 (ts3.6) — 2021-07-08
- 2.0.0 (ts2.0) — 2019-10-02
- 5.0.0 — 2024-01-27
- 2.0.2 — 2023-10-18

## README

# Installation
> `npm install --save @types/mysql-import`

# Summary
This package contains type definitions for mysql-import (https://github.com/pamblam/mysql-import#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mysql-import.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mysql-import/index.d.ts)
````ts
import { ConnectionOptions } from "mysql2";

export default class Importer {
    constructor(settings: ConnectionOptions);

    getImported(): Array<{ file: string; size: number }>;
    setEncoding(encoding: "utf8" | "ucs2" | "utf16le" | "latin1" | "ascii" | "base64" | "hex"): void;
    use(database: string): Promise<void>;
    onProgress(
        cb: (object: {
            total_files: number;
            file_no: number;
            bytes_processed: number;
            total_bytes: number;
            file_path: string;
        }) => void,
    ): void;
    onDumpComplete(
        cb: (object: {
            total_files: number;
            file_no: number;
            file_path: string;
            error: Error | null;
        }) => void,
    ): void;
    import(...input: ReadonlyArray<string | readonly string[]>): Promise<void>;
    disconnect(graceful?: boolean): Promise<void>;
}

````

### Additional Details
 * Last updated: Mon, 29 Jan 2024 22:06:49 GMT
 * Dependencies: [mysql2](https://npmjs.com/package/mysql2)

# Credits
These definitions were written by [Ben Grynhaus](https://github.com/bengry), and [Chiaki Abe](https://github.com/doubutsunokarada).

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