vue/flow/ssr.js
Herrington Darkholme 2ac581bb7f SSR: eliminate closure in render.js implementation
eliminate closure

fix multiple render instances and memory leakage

fix eslint

magically fix flow typing

add multiple render stream test
2016-11-01 11:14:46 -04:00

22 lines
446 B
JavaScript

declare type ComponentWithCacheContext = {
type: 'ComponentWithCache';
bufferIndex: number;
buffer: Array<string>;
key: string;
}
declare type ElementContext = {
type: 'Element';
children: Array<VNode>;
rendered: number;
endTag: string;
total: number;
}
declare type ComponentContext = {
type: 'Component';
prevActive: Component;
}
declare type RenderState = ComponentContext | ComponentWithCacheContext | ElementContext