【发布时间】:2021-03-25 03:08:19
【问题描述】:
我收到了"export 'resize' was not found in '@engineers/graphics'
graphics.ts
https://github.com/eng-dibo/ngx/blob/master/packages/graphics/index.ts#L33
export type Img = string | Buffer | Sharp;
export type Size = number | string | null;
/**
* [resize description]
* @method resize
* @param {Img} img file path or image buffer;
* @param {Size | Size[]} size width or [width, height] or 'width,height', if size=null just convert img type
* @param {[type]} options [description]
* @return Promise<info>
*
* todo:
* - rename size to dimensions
* - convert(img) = resize(img,size=null,{output=type})
*/
export function resize(
img: Img,
size: Size | Size[],
options: ResizeOptions = {}
): Promise<any> {}
在其他文件中:
https://github.com/eng-dibo/ngx/blob/master/projects/cms/server/api/v1.ts#L12
import { resize } from "@engineers/graphics/index";
【问题讨论】:
标签: typescript webpack ts-loader