1.0.4 • Published 7 months ago
@types/filter-css v1.0.4
Installation
npm install --save @types/filter-css
Summary
This package contains type definitions for filter-css (https://github.com/bezoerb/filter-css#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/filter-css.
index.d.ts
// Type definitions for filter-css 1.0
// Project: https://github.com/bezoerb/filter-css#readme
// Definitions by: cherryblossom <https://github.com/cherryblossom000>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { AtRule, Comment, Rule } from 'css';
export = api;
declare function api(inputStylesheet: string, ignorePattern: api.Pattern | api.Pattern[], options?: api.Options): string;
declare namespace api {
type Context = 'type' | 'media' | 'selector' | 'declarationProperty' | 'declarationValue';
/**
* @param context The current matching context.
* @param value The current value.
* @param node The current AST node generated by [`css`]{@link https://github.com/reworkcss/css} being processed.
* @returns Whether the element should be discarded.
*/
type PatternFunction = (context: Context, value: string | undefined, node: Rule | Comment | AtRule) => boolean;
type Pattern = string | RegExp | PatternFunction;
interface Options {
/**
* Whether to match CSS selectors.
* @default true
*/
matchSelectors?: boolean | undefined;
/**
* Whether to match [AST Node types]{@link https://github.com/reworkcss/css#types} like `font-face`.
* @default true
*/
matchTypes?: boolean | undefined;
/**
* Whether to match CSS properties like `background-image`.
* @default true
*/
matchDeclarationProperties?: boolean | undefined;
/**
* Whether to match CSS values like `url(...)`.
* @default true
*/
matchDeclarationValues?: boolean | undefined;
/**
* Whether to match media queries like `min-device-pixel-ratio: 2`.
* @default true
*/
matchMedia?: boolean | undefined;
}
}
Additional Details
- Last updated: Thu, 08 Jul 2021 12:01:36 GMT
- Dependencies: @types/css
- Global values: none
Credits
These definitions were written by cherryblossom.