UNPKG

932 BTypeScriptView Raw
1// Type definitions for icss-utils 5.1
2// Project: https://github.com/css-modules/icss-utils#readme
3// Definitions by: Bob Matcuk <https://github.com/bmatcuk>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5// TypeScript Version: 2.2
6
7import { Container, Rule } from "postcss";
8
9export interface Replacements {
10 [key: string]: string;
11}
12
13export interface CSSImports {
14 [key: string]: { [key: string]: string };
15}
16
17export interface CSSExports {
18 [key: string]: string;
19}
20
21export interface ExtractedICSS {
22 icssImports: CSSImports;
23 icssExports: CSSExports;
24}
25
26export function replaceValueSymbols(value: string, replacements: Replacements): string;
27
28export function replaceSymbols(css: Container, replacements: Replacements): void;
29
30export function extractICSS(css: Container, removeRules?: boolean): ExtractedICSS;
31
32export function createICSSRules(imports: CSSImports, exports: CSSExports): Rule[];