File tree 2 files changed +9
-0
lines changed
packages/vue-server-renderer/types
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ interface Renderer {
11
11
renderToString ( vm : Vue , callback : RenderCallback ) : void ;
12
12
renderToString ( vm : Vue , context : object , callback : RenderCallback ) : void ;
13
13
renderToString ( vm : Vue ) : Promise < string > ;
14
+ renderToString ( vm : Vue , context : object ) : Promise < string > ;
14
15
15
16
renderToStream ( vm : Vue , context ?: object ) : Readable ;
16
17
}
Original file line number Diff line number Diff line change @@ -46,6 +46,14 @@ renderer.renderToString(app)
46
46
throw err ;
47
47
} ) ;
48
48
49
+ renderer . renderToString ( app , context )
50
+ . then ( html => {
51
+ const res : string = html ;
52
+ } )
53
+ . catch ( err => {
54
+ throw err ;
55
+ } ) ;
56
+
49
57
renderer . renderToStream ( app , context ) . on ( 'data' , chunk => {
50
58
const html = chunk . toString ( ) ;
51
59
} ) ;
You can’t perform that action at this time.
0 commit comments