0.7.5 • Published 6 months ago
@types/webp-in-css v0.7.5
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
- Last updated: Mon, 10 Jan 2022 20:31:30 GMT
- Dependencies: @types/postcss, @types/node
- Global values: none
Credits
These definitions were written by Piotr Błażejewicz.