statistic.d.ts 877 B

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