Socket
Socket
Sign inDemoInstall

@types/lqip-modern

Package Overview
Dependencies
35
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/lqip-modern

TypeScript definitions for lqip-modern


Version published
Weekly downloads
491
decreased by-29.35%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Installation

npm install --save @types/lqip-modern

Summary

This package contains type definitions for lqip-modern (https://github.com/transitive-bullshit/lqip-modern/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lqip-modern.

index.d.ts

// Type definitions for lqip-modern 1.1
// Project: https://github.com/transitive-bullshit/lqip-modern/
// Definitions by: Yaroslav Kiliba <https://github.com/Dattaya>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.2

/// <reference types="node" />

import sharp = require('sharp');

declare namespace lqip {
    interface LqipResult {
        content: Buffer;
        metadata: {
            originalWidth: number;
            originalHeight: number;
            width: number;
            height: number;
            type: OutputFormat;
            dataURIBase64: string;
        };
    }

    type OutputFormat = WebpOptions['outputFormat'] | JpegOptions['outputFormat'] | JpgOptions['outputFormat'];

    type LqipOptions = WebpOptions | JpegOptions | JpgOptions | DefaultOptions;

    interface DefaultOptions {
        concurrency?: number | undefined;
        resize?: number | ReadonlyArray<any> | undefined;
    }

    interface WebpOptions extends DefaultOptions {
        readonly outputFormat?: 'webp' | undefined;
        readonly outputOptions?: sharp.WebpOptions | undefined;
    }
    interface JpegOptions extends DefaultOptions {
        readonly outputFormat: 'jpeg';
        readonly outputOptions?: sharp.JpegOptions | undefined;
    }
    interface JpgOptions extends DefaultOptions {
        readonly outputFormat: 'jpg';
        readonly outputOptions?: sharp.JpegOptions | undefined;
    }
}

declare function lqip(input: string | Buffer, options?: lqip.LqipOptions): Promise<lqip.LqipResult>;
declare function lqip(
    input: ReadonlyArray<string> | ReadonlyArray<Buffer>,
    options?: lqip.LqipOptions,
): Promise<lqip.LqipResult[]>;

export = lqip;

Additional Details

  • Last updated: Thu, 08 Jul 2021 16:23:51 GMT
  • Dependencies: @types/sharp, @types/node
  • Global values: none

Credits

These definitions were written by Yaroslav Kiliba.

FAQs

Last updated on 08 Jul 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc