refactor: better naming for baseCompile argument

This commit is contained in:
Evan You 2023-11-21 22:08:49 +08:00
parent 94c86269d0
commit e41cf8dc59
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ export function getBaseTransformPreset(
// we name it `baseCompile` so that higher order compilers like
// @vue/compiler-dom can export `compile` while re-exporting everything else.
export function baseCompile(
template: string | RootNode,
source: string | RootNode,
options: CompilerOptions = {}
): CodegenResult {
const onError = options.onError || defaultOnError
@ -82,7 +82,7 @@ export function baseCompile(
onError(createCompilerError(ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED))
}
const ast = isString(template) ? baseParse(template, options) : template
const ast = isString(source) ? baseParse(source, options) : source
const [nodeTransforms, directiveTransforms] =
getBaseTransformPreset(prefixIdentifiers)