5.0.3 • Published 6 months ago

@types/postcss-inline-svg v5.0.3

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

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

// Type definitions for postcss-inline-svg 5.0
// Project: https://github.com/TrySound/postcss-inline-svg
// Definitions by: Anatoly Pitikin <https://github.com/xapdkop>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Sat, 04 Sep 2021 21:01:21 GMT
  • Dependencies: @types/postcss
  • Global values: none

Credits

These definitions were written by Anatoly Pitikin.

5.0.3

6 months ago

5.0.2

7 months ago

5.0.1

8 months ago

5.0.0

3 years ago