UNPKG

1.62 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/icss-utils`
3
4# Summary
5This package contains type definitions for icss-utils (https://github.com/css-modules/icss-utils#readme).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/icss-utils.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/icss-utils/index.d.ts)
10````ts
11// Type definitions for icss-utils 5.1
12// Project: https://github.com/css-modules/icss-utils#readme
13// Definitions by: Bob Matcuk <https://github.com/bmatcuk>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15// TypeScript Version: 2.2
16
17import { Container, Rule } from "postcss";
18
19export interface Replacements {
20 [key: string]: string;
21}
22
23export interface CSSImports {
24 [key: string]: { [key: string]: string };
25}
26
27export interface CSSExports {
28 [key: string]: string;
29}
30
31export interface ExtractedICSS {
32 icssImports: CSSImports;
33 icssExports: CSSExports;
34}
35
36export function replaceValueSymbols(value: string, replacements: Replacements): string;
37
38export function replaceSymbols(css: Container, replacements: Replacements): void;
39
40export function extractICSS(css: Container, removeRules?: boolean): ExtractedICSS;
41
42export function createICSSRules(imports: CSSImports, exports: CSSExports): Rule[];
43
44````
45
46### Additional Details
47 * Last updated: Thu, 18 Nov 2021 19:01:38 GMT
48 * Dependencies: [@types/postcss](https://npmjs.com/package/@types/postcss)
49 * Global values: none
50
51# Credits
52These definitions were written by [Bob Matcuk](https://github.com/bmatcuk).
53
\No newline at end of file