0.7.5 • Published 6 months ago

@types/webp-in-css v0.7.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/webp-in-css

Summary

This package contains type definitions for webp-in-css (https://www.npmjs.com/package/webp-in-css).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webp-in-css.

index.d.ts

// Type definitions for webp-in-css 0.7
// Project: https://www.npmjs.com/package/webp-in-css
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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

// tslint:disable-next-line  no-declare-current-package keeping it simple
declare module 'webp-in-css/polyfill' {
    // nothing here, global script
}

// tslint:disable-next-line  no-declare-current-package keeping it simple
declare module 'webp-in-css/plugin' {
    import { Declaration, PluginCreator } from 'postcss';

    namespace webpInCss {
        interface Options {
            /** @default false */
            modules?: boolean | undefined;
            /** @default 'webp' */
            webpClass?: string | undefined;
            /** @default 'no-webp' */
            noWebpClass?: string | undefined;
            /** @default true */
            addNoJs?: boolean | undefined;
            /** @default 'no-js' */
            noJsClass?: string | undefined;
            /** @default decl => /\.(jpe?g|png)(?!(\.webp|.*[&?]format=webp))/i.test(decl.value) */
            check?: (decl: Declaration) => boolean;
            /** @default oldName => oldName.replace(/\.(jpe?g|png)/gi, '.webp') */
            rename?: (url: string) => string;
        }

        type Plugin = PluginCreator<Options>;
    }

    const webpInCss: webpInCss.Plugin;

    export = webpInCss;
}

Additional Details

Credits

These definitions were written by Piotr Błażejewicz.

0.7.5

6 months ago

0.7.2

9 months ago

0.7.4

7 months ago

0.7.3

8 months ago

0.7.1

1 year ago

0.7.0

2 years ago