2016-10-21 01:34:06 +08:00
|
|
|
declare type ComponentWithCacheContext = {
|
|
|
|
type: 'ComponentWithCache';
|
|
|
|
bufferIndex: number;
|
|
|
|
buffer: Array<string>;
|
|
|
|
key: string;
|
2017-05-15 16:01:30 +08:00
|
|
|
};
|
2016-10-21 01:34:06 +08:00
|
|
|
|
|
|
|
declare type ElementContext = {
|
|
|
|
type: 'Element';
|
|
|
|
children: Array<VNode>;
|
|
|
|
rendered: number;
|
|
|
|
endTag: string;
|
|
|
|
total: number;
|
2017-05-15 16:01:30 +08:00
|
|
|
};
|
2016-10-21 01:34:06 +08:00
|
|
|
|
|
|
|
declare type ComponentContext = {
|
|
|
|
type: 'Component';
|
|
|
|
prevActive: Component;
|
2017-05-15 16:01:30 +08:00
|
|
|
};
|
2016-10-21 01:34:06 +08:00
|
|
|
|
2017-05-15 16:01:30 +08:00
|
|
|
declare type RenderState = ComponentContext | ComponentWithCacheContext | ElementContext;
|