# @dawnjs/types

> ## 安装依赖

Latest version **2.0.2** (published 2022-04-14) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2022-04-14 |
| First published | 2020-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 35.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1127 |
| Maintainers | djknight, jeason, soulwu, ssbabysong |

## Links

- npm: https://www.npmjs.com/package/@dawnjs/types
- Repository: https://github.com/alibaba/dawn
- Homepage: http://dawnjs.com
- Issues: https://github.com/alibaba/dawn/issues
- npm.io page: https://npm.io/package/@dawnjs/types

## Dependencies (6)

- [del](https://npm.io/package/del.md) ^5.1.0
- [ntils](https://npm.io/package/ntils.md) ^5.1.2
- [globby](https://npm.io/package/globby.md) ^11.0.0
- [@npm/types](https://npm.io/package/@npm/types.md) ^1.0.1
- [@types/inquirer](https://npm.io/package/@types/inquirer.md) ^6.5.0
- [@types/node-fetch](https://npm.io/package/@types/node-fetch.md) ^2.5.7

## Recent versions

- 2.0.2 (latest) — 2022-04-14
- 1.8.5-alpha.5 (next) — 2020-05-08
- 2.0.1 — 2021-04-12
- 1.8.6 — 2021-04-12
- 1.8.5 — 2020-05-13
- 1.8.5-alpha.9 — 2020-05-08
- 1.8.5-alpha.8 — 2020-05-08
- 1.8.5-alpha.7 — 2020-05-08
- 1.8.5-alpha.6 — 2020-05-08
- 1.8.5-alpha.4 — 2020-05-08
- 1.8.5-alpha.3 — 2020-05-08
- 1.8.5-alpha.2 — 2020-05-08
- 1.8.5-alpha.0 — 2020-05-08

## README

# @dawnjs/types

## 安装依赖

```bash
$ npm install --save-dev @dawnjs/types
```

## 使用方式

```typescript
// 中间件的 TS 入口文件
// src/index.ts

import * as Dawn from "@dawnjs/types";

interface IOptions {
  name?: string;
  age?: number;
}

const handler: Dawn.Handler<IOptions> = opts => {
  return async (next, ctx) => {
    ctx.console.log(`My name is ${opts.name}`);
    ctx.console.log(ctx.utils.isFunction(ctx.load));
    await next();
  };
};

export default handler;
```

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