Skip to content

Commit 730a10f

Browse files
committed
types: type sync for template-compiler and server-renderer
1 parent 7fb6fdd commit 730a10f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Diff for: packages/vue-server-renderer/types/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ interface RendererOptions {
3838

3939
interface BundleRendererOptions extends RendererOptions {
4040
clientManifest?: object;
41+
serializer?: (state: object) => string;
4142
runInNewContext?: boolean | 'once';
4243
basedir?: string;
4344
}

Diff for: packages/vue-template-compiler/types/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ export interface ASTText {
189189
*/
190190
interface SFCParserOptions {
191191
pad?: true | 'line' | 'space';
192+
deindent?: boolean
192193
}
193194

194195
export interface SFCBlock {

Diff for: packages/vue-template-compiler/types/test.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import {
44
compileToFunctions,
55
ssrCompile,
66
ssrCompileToFunctions,
7-
parseComponent
7+
parseComponent,
8+
generateCodeFrame
89
} from "./";
910

1011
// check compile options
@@ -78,9 +79,12 @@ const vnode: VNode = compiledFns.render.call(vm);
7879

7980
// check SFC parser
8081
const desc = parseComponent("<template></template>", {
81-
pad: "space"
82+
pad: "space",
83+
deindent: false
8284
});
8385

8486
const templateContent: string = desc.template!.content;
8587
const scriptContent: string = desc.script!.content;
8688
const styleContent: string = desc.styles.map(s => s.content).join("\n");
89+
90+
const codeframe: string = generateCodeFrame(`foobar`, 0, 4)

0 commit comments

Comments
 (0)