Hyoretsu

Auto import works but has types error

Sep 28th, 2020
977
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* eslint-disable @typescript-eslint/naming-convention */
  2. /* eslint-disable @typescript-eslint/no-unused-vars */
  3. /* eslint-disable no-shadow */
  4. /// <reference types="node" />
  5.  
  6. function imagemin(input: ReadonlyArray<string>, options?: imagemin.Options): Promise<imagemin.Result[]>;
  7.  
  8. declare module 'imagemin-overwrite' {
  9.  type Plugin = (input: Buffer) => Promise<Buffer>;
  10.  
  11.  interface Options {
  12.   destination?: string;
  13.   plugins: ReadonlyArray<Plugin>;
  14.   glob?: boolean;
  15.  }
  16.  
  17.  interface Result {
  18.   data: Buffer;
  19.   sourcePath: string;
  20.   destinationPath: string;
  21.  }
  22.  
  23.  interface BufferOptions {
  24.   plugins: ReadonlyArray<Plugin>;
  25.  }
  26.  
  27.  function buffer(buffer: Buffer, options?: BufferOptions): Promise<Buffer>;
  28.  
  29.  export = imagemin;
  30. }
  31.  
RAW Paste Data