UNPKG

2.09 kBTypeScriptView Raw
1import * as postcss from 'postcss';
2import { Diagnostics } from './diagnostics';
3import { StylableMeta } from './stylable-processor';
4import { CSSResolve, JSResolve, StylableResolver } from './stylable-resolver';
5import { replaceValueHook, StylableTransformer } from './stylable-transformer';
6export declare type ValueFormatter = (name: string) => string;
7export declare type ResolvedFormatter = Record<string, JSResolve | CSSResolve | ValueFormatter | null>;
8export declare const functionWarnings: {
9 FAIL_TO_EXECUTE_FORMATTER: (resolvedValue: string, message: string) => string;
10 CYCLIC_VALUE: (cyclicChain: string[]) => string;
11 CANNOT_USE_AS_VALUE: (type: string, varName: string) => string;
12 CANNOT_USE_JS_AS_VALUE: (varName: string) => string;
13 CANNOT_FIND_IMPORTED_VAR: (varName: string) => string;
14 MULTI_ARGS_IN_VALUE: (args: string) => string;
15 COULD_NOT_RESOLVE_VALUE: (args: string) => string;
16 UNKNOWN_FORMATTER: (name: string) => string;
17 UNKNOWN_VAR: (name: string) => string;
18};
19export declare function resolveArgumentsValue(options: Record<string, string>, transformer: StylableTransformer, meta: StylableMeta, diagnostics: Diagnostics, node: postcss.Node, variableOverride?: Record<string, string>, path?: string[], cssVarsMapping?: Record<string, string>): Record<string, string>;
20export declare function processDeclarationValue(resolver: StylableResolver, value: string, meta: StylableMeta, node?: postcss.Node, variableOverride?: Record<string, string> | null, valueHook?: replaceValueHook, diagnostics?: Diagnostics, passedThrough?: string[], cssVarsMapping?: Record<string, string>, args?: string[]): {
21 topLevelType: any;
22 outputValue: string;
23 typeError: Error;
24};
25export declare function evalDeclarationValue(resolver: StylableResolver, value: string, meta: StylableMeta, node?: postcss.Node, variableOverride?: Record<string, string> | null, valueHook?: replaceValueHook, diagnostics?: Diagnostics, passedThrough?: string[], cssVarsMapping?: Record<string, string>, args?: string[]): string;
26//# sourceMappingURL=functions.d.ts.map
\No newline at end of file