@types/postcss-inline-svg
TypeScript icon, indicating that this package has built-in type declarations

5.0.3 • Public • Published

Installation

npm install --save @types/postcss-inline-svg

Summary

This package contains type definitions for postcss-inline-svg (https://github.com/TrySound/postcss-inline-svg).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/postcss-inline-svg.

index.d.ts

import { PluginCreator } from "postcss";

declare namespace postcssInlineSvg {
    interface Options {
        /**
         * Array of paths to resolve URL. Paths are tried in order, until an existing file is found.
         * If omitted, path will be relative to source file if it was specified
         */
        paths?: readonly string[];

        /**
         * Removes all `fill` attributes before applying specified. Passed `RegExp` filters files by ID
         * @default false
         */
        readonly removeFill?: RegExp | boolean;

        /**
         * Removes all `stroke` attributes before applying specified. Passed `RegExp` filters files by ID
         * @default false
         */
        removeStroke?: RegExp | boolean;

        /**
         * Processes SVG after applying parameters
         */
        encode?: (svg: string) => string;

        /**
         * Transforms SVG after `encode` function and generates URL
         */
        transform?: (svg: string, path: string) => string;

        /**
         * Adds `xmlns` attribute to SVG if not present
         * @default true
         */
        xmlns?: boolean;
    }
}

declare const postcssInlineSvg: PluginCreator<postcssInlineSvg.Options>;

export = postcssInlineSvg;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: postcss

Credits

These definitions were written by Anatoly Pitikin.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/postcss-inline-svg

Weekly Downloads

751

Version

5.0.3

License

MIT

Unpacked Size

5.2 kB

Total Files

5

Last publish

Collaborators

  • types