Files
imagemin-oxipng/index.test-d.ts
2020-08-03 21:29:27 +08:00

14 lines
336 B
TypeScript

import * as fs from 'fs';
import * as path from 'path';
import {expectType} from 'tsd';
import imageminOxipng from '.';
const buffer = fs.readFileSync(path.join(__dirname, 'fixture.png'));
(async () => {
expectType<Buffer>(await imageminOxipng()(buffer));
expectType<Buffer>(await imageminOxipng({
quality: 2,
})(buffer));
})();