@zeplin/extension-model
Version:
Models exposed to Zeplin extensions
18 lines (17 loc) • 761 B
TypeScript
import { VariableCollection } from "../variableCollection.js";
import { Variable, VariableData } from "../variable.js";
/**
* Creates a map of variables indexed by their sourceId
*
* @param variableCollections Array of variable collections
* @returns Object mapping sourceId to variable
*/
export declare function getVariableBySourceId(variableCollections?: VariableCollection[]): Record<string, Variable>;
/**
* Determines if a variable is a color variable
*
* @param variable The variable to check
* @param variableBySourceId Map of variables by sourceId
* @returns True if the variable is a color variable, false otherwise
*/
export declare function isColorVariable(variable: VariableData, variableBySourceId?: Record<string, Variable>): boolean;