test(ssr): test for rendering components

This commit is contained in:
Evan You
2020-01-29 16:46:18 -05:00
parent 6e06810add
commit 8cdaf28515
4 changed files with 267 additions and 21 deletions

View File

@@ -64,7 +64,12 @@ export interface ComponentOptionsBase<
// type.
render?: Function
// SSR only. This is produced by compiler-ssr and attached in compiler-sfc
ssrRender?: Function
// not user facing, so the typing is lax and for test only.
ssrRender?: (
ctx: any,
push: (item: any) => void,
parentInstance: ComponentInternalInstance
) => void
components?: Record<
string,
Component | { new (): ComponentPublicInstance<any, any, any, any, any> }