statistic.d.ts 1020 B

1234567891011121314151617181920
  1. import type { TokenMap } from '../interface';
  2. /**
  3. * This function will do as `Object.assign` in production. But will use Object.defineProperty:get to
  4. * pass all value access in development. To support statistic field usage with alias token.
  5. */
  6. export declare function merge<CompTokenMap extends TokenMap>(...objs: Partial<CompTokenMap>[]): CompTokenMap;
  7. /** @internal Internal Usage. Not use in your production. */
  8. export declare const statistic: Record<string, {
  9. global: string[];
  10. component: Record<string, string | number>;
  11. }>;
  12. /** @internal Internal Usage. Not use in your production. */
  13. export declare const _statistic_build_: typeof statistic;
  14. /** Statistic token usage case. Should use `merge` function if you do not want spread record. */
  15. declare const statisticToken: <CompTokenMap extends TokenMap>(token: CompTokenMap) => {
  16. token: CompTokenMap;
  17. keys: Set<string>;
  18. flush: (componentName: string, componentToken: Record<string, string | number>) => void;
  19. };
  20. export default statisticToken;