UNPKG

@terrazzo/plugin-js

Version:

Use DTCG tokens in Node.js for server-rendered applications.

20 lines 1.05 kB
import type { Token, TokenNormalized, TokenNormalizedSet } from '@terrazzo/parser'; export declare const FORMAT_ID = "js"; export declare const DEFAULT_PROPERTIES: Set<keyof TokenNormalized>; export interface JSPluginOptions<T extends Record<string, string> = Record<string, string>> { /** * Change the output filename * @default "index.js" */ filename?: string; /** Only generate permutations for the specified modifiers (by default, generate all permutations) */ contexts?: { [key in keyof T]: T[keyof T][]; }; /** Only include specified properties as part of token output. */ properties?: (keyof TokenNormalized)[]; } export type Resolver<T extends Record<string, string>> = (input: T) => TokenNormalizedSet; export declare const FILE_HEADER = "/** ------------------------------------------\n * Autogenerated by \u26CB Terrazzo. DO NOT EDIT!\n * ------------------------------------------- */"; export declare const TYPE_MAP: Record<Token['$type'], string>; //# sourceMappingURL=lib.d.ts.map