feat(compiler-sfc): compileScript parseOnly mode

This is an internal feature meant for IDE support
This commit is contained in:
Evan You
2021-06-29 17:56:49 -04:00
parent 96cc335aa7
commit 601a290caa
3 changed files with 277 additions and 58 deletions

View File

@@ -42,6 +42,25 @@ export interface SFCScriptBlock extends SFCBlock {
bindings?: BindingMetadata
scriptAst?: Statement[]
scriptSetupAst?: Statement[]
ranges?: ScriptSetupTextRanges
}
/**
* Text range data for IDE support
*/
export interface ScriptSetupTextRanges {
scriptBindings: TextRange[]
scriptSetupBindings: TextRange[]
propsTypeArg?: TextRange
propsRuntimeArg?: TextRange
emitsTypeArg?: TextRange
emitsRuntimeArg?: TextRange
withDefaultsArg?: TextRange
}
export interface TextRange {
start: number
end: number
}
export interface SFCStyleBlock extends SFCBlock {