diff --git a/src/common/parser-options.ts b/src/common/parser-options.ts index d28504e..25656ab 100644 --- a/src/common/parser-options.ts +++ b/src/common/parser-options.ts @@ -30,6 +30,7 @@ export interface ParserOptions { lib?: string[] project?: string | string[] + projectService?: boolean | ProjectServiceOptions projectFolderIgnoreList?: string[] tsconfigRootDir?: string extraFileExtensions?: string[] @@ -55,6 +56,13 @@ export interface ParserOptions { > } +interface ProjectServiceOptions { + allowDefaultProject?: string[] + defaultProject?: string + loadTypeScriptPlugins?: boolean + maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number +} + export function isSFCFile(parserOptions: ParserOptions) { if (parserOptions.filePath === "") { return true diff --git a/src/html/parser.ts b/src/html/parser.ts index fada147..367eecc 100644 --- a/src/html/parser.ts +++ b/src/html/parser.ts @@ -302,6 +302,8 @@ export class Parser { yield getParserLangFromSFC(doc) }, ), + project: undefined, + projectService: undefined, } const scriptParserOptions = { ...this.baseParserOptions, diff --git a/src/index.ts b/src/index.ts index 33eb1c3..3b45a18 100644 --- a/src/index.ts +++ b/src/index.ts @@ -165,6 +165,8 @@ function parseAsSFC(code: string, options: ParserOptions) { yield "