umi-types
Version:
Type definitions for umi.
39 lines (26 loc) • 881 B
Markdown
# umi-types
Type definitions for umi.
[](https://npmjs.org/package/umi-types) [](https://travis-ci.org/umijs/umi-types) [](https://npmjs.org/package/umi-types)
## Why
## Installation
```bash
$ yarn add umi-types
```
## Usage
```ts
import { IApi } from 'umi-types';
export default function(api: IApi) {
api.log.success('hello');
}
```
```ts
import { IApi, IModifyHTMLWithASTFunc } from 'umi-types';
export default function(api: IApi) {
const appendHead: IModifyHTMLWithASTFunc = ($, { route, getChunkPath }) => {
$('head').append(`<script src="${getChunkPath('a.js')}"></script>`);
};
api.modifyHTMLWithAST(appendHead);
}
```
## LICENSE
MIT