mirror of
https://github.com/HackPlan/imagemin-oxipng.git
synced 2026-04-29 21:35:22 +08:00
14 lines
336 B
TypeScript
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));
|
|
})();
|