chore: typo fixes (#1546)
* chore: fix typos in comments/JSDoc. * chore: fix typo in internal function name. * chore: fix typos in test comments/descriptions/variable names.
This commit is contained in:
@@ -333,7 +333,7 @@ function genFunctionPreamble(ast: RootNode, context: CodegenContext) {
|
||||
}
|
||||
// generate variables for ssr helpers
|
||||
if (!__BROWSER__ && ast.ssrHelpers && ast.ssrHelpers.length) {
|
||||
// ssr guaruntees prefixIdentifier: true
|
||||
// ssr guarantees prefixIdentifier: true
|
||||
push(
|
||||
`const { ${ast.ssrHelpers
|
||||
.map(aliasHelper)
|
||||
@@ -372,7 +372,7 @@ function genModulePreamble(
|
||||
// when bundled with webpack with code-split, calling an import binding
|
||||
// as a function leads to it being wrapped with `Object(a.b)` or `(0,a.b)`,
|
||||
// incurring both payload size increase and potential perf overhead.
|
||||
// therefore we assign the imports to vairables (which is a constant ~50b
|
||||
// therefore we assign the imports to variables (which is a constant ~50b
|
||||
// cost per-component instead of scaling with template size)
|
||||
push(
|
||||
`import { ${ast.helpers
|
||||
@@ -446,7 +446,7 @@ function genHoists(hoists: (JSChildNode | null)[], context: CodegenContext) {
|
||||
const genScopeId = !__BROWSER__ && scopeId != null && mode !== 'function'
|
||||
newline()
|
||||
|
||||
// push scope Id before initilaizing hoisted vnodes so that these vnodes
|
||||
// push scope Id before initializing hoisted vnodes so that these vnodes
|
||||
// get the proper scopeId as well.
|
||||
if (genScopeId) {
|
||||
push(`${helper(PUSH_SCOPE_ID)}("${scopeId}")`)
|
||||
|
||||
@@ -59,7 +59,7 @@ export type HoistTransform = (
|
||||
|
||||
export interface TransformOptions {
|
||||
/**
|
||||
* An array of node trasnforms to be applied to every AST node.
|
||||
* An array of node transforms to be applied to every AST node.
|
||||
*/
|
||||
nodeTransforms?: NodeTransform[]
|
||||
/**
|
||||
@@ -118,7 +118,7 @@ export interface TransformOptions {
|
||||
scopeId?: string | null
|
||||
/**
|
||||
* Generate SSR-optimized render functions instead.
|
||||
* The resulting funciton must be attached to the component via the
|
||||
* The resulting function must be attached to the component via the
|
||||
* `ssrRender` option instead of `render`.
|
||||
*/
|
||||
ssr?: boolean
|
||||
|
||||
@@ -51,7 +51,7 @@ function walk(
|
||||
doNotHoistNode: boolean = false
|
||||
) {
|
||||
let hasHoistedNode = false
|
||||
// Some transforms, e.g. trasnformAssetUrls from @vue/compiler-sfc, replaces
|
||||
// Some transforms, e.g. transformAssetUrls from @vue/compiler-sfc, replaces
|
||||
// static bindings with expressions. These expressions are guaranteed to be
|
||||
// constant so they are still eligible for hoisting, but they are only
|
||||
// available at runtime and therefore cannot be evaluated ahead of time.
|
||||
|
||||
@@ -280,7 +280,7 @@ export function buildProps(
|
||||
if (
|
||||
!isComponent &&
|
||||
isOn(name) &&
|
||||
// omit the flag for click handlers becaues hydration gives click
|
||||
// omit the flag for click handlers because hydration gives click
|
||||
// dedicated fast path.
|
||||
name.toLowerCase() !== 'onclick' &&
|
||||
// omit v-model handlers
|
||||
|
||||
Reference in New Issue
Block a user