ssr.js 450 B

123456789101112131415161718192021
  1. declare type ComponentWithCacheContext = {
  2. type: 'ComponentWithCache';
  3. bufferIndex: number;
  4. buffer: Array<string>;
  5. key: string;
  6. };
  7. declare type ElementContext = {
  8. type: 'Element';
  9. children: Array<VNode>;
  10. rendered: number;
  11. endTag: string;
  12. total: number;
  13. };
  14. declare type ComponentContext = {
  15. type: 'Component';
  16. prevActive: Component;
  17. };
  18. declare type RenderState = ComponentContext | ComponentWithCacheContext | ElementContext;