]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix comment typos (#94)
authorCarlos Rodrigues <david-181@hotmail.com>
Sat, 5 Oct 2019 14:35:19 +0000 (15:35 +0100)
committerEvan You <yyx990803@gmail.com>
Sat, 5 Oct 2019 14:35:19 +0000 (10:35 -0400)
packages/compiler-core/src/codegen.ts
packages/compiler-core/src/errors.ts
packages/compiler-core/src/transforms/transformExpression.ts
packages/compiler-core/src/transforms/vFor.ts
packages/compiler-core/src/transforms/vOn.ts
packages/runtime-dom/src/modules/class.ts
packages/runtime-dom/src/modules/events.ts
packages/shared/src/patchFlags.ts

index e1befb9e1081244e982707e977cf58420caa3a73..4c468e30df86d80fc251d2377a10a814c9c584cc 100644 (file)
@@ -190,7 +190,7 @@ export function generate(
         // save Vue in a separate variable to avoid collision
         push(`const _Vue = Vue\n`)
         // in "with" mode, helpers are declared inside the with block to avoid
-        // has check cost, but hosits are lifted out of the function - we need
+        // has check cost, but hoists are lifted out of the function - we need
         // to provide the helper here.
         if (ast.hoists.length) {
           push(`const _${CREATE_VNODE} = Vue.createVNode\n`)
index e64183dd3941035a60a66f219aaff6aed5a16c45..64716f7ed12de5edb3fcf953a0f5d478ad129c21 100644 (file)
@@ -135,7 +135,7 @@ export const errorMessages: { [code: number]: string } = {
     'Interpolation end sign was not found.',
   [ErrorCodes.X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END]:
     'End bracket for dynamic directive argument was not found. ' +
-    'Note that dynamic directive argument connot contain spaces.',
+    'Note that dynamic directive argument cannot contain spaces.',
 
   // transform errors
   [ErrorCodes.X_IF_NO_EXPRESSION]: `v-if/v-else-if is missing expression.`,
index a88b28a9c29811697f9e4f8865733d7c2a523404..fc6ca61d5d792b0c7158886310dc1f71ef917c7a 100644 (file)
@@ -113,7 +113,7 @@ export function processExpression(
             node.name = `_ctx.${node.name}`
             ids.push(node)
           } else if (!isStaticPropertyKey(node, parent)) {
-            // also generate sub-expressioms for other identifiers for better
+            // also generate sub-expressions for other identifiers for better
             // source map support. (except for property keys which are static)
             ids.push(node)
           }
@@ -126,7 +126,7 @@ export function processExpression(
             enter(child, parent) {
               if (
                 child.type === 'Identifier' &&
-                // do not record as scope variable if is a destrcuture key
+                // do not record as scope variable if is a destructured key
                 !isStaticPropertyKey(child, parent) &&
                 // do not record if this is a default value
                 // assignment of a destructured variable
@@ -170,7 +170,7 @@ export function processExpression(
     }
   })
 
-  // We break up the coumpound expression into an array of strings and sub
+  // We break up the compound expression into an array of strings and sub
   // expressions (for identifiers that have been prefixed). In codegen, if
   // an ExpressionNode has the `.children` property, it will be used instead of
   // `.content`.
index 6deaa30667acfb34a56ad793ee7a67524a52ced5..70b170bfdf9462173d25bb458c8334eba5334db8 100644 (file)
@@ -135,7 +135,7 @@ export const transformFor = createStructuralDirectiveTransform(
             }
           } else if (isTemplate) {
             // <template v-for="...">
-            // should genereate a fragment block for each loop
+            // should generate a fragment block for each loop
             childBlock = createBlockExpression(
               [
                 helper(FRAGMENT),
index 9f3b0a91d7d3c9f43440d770925885234f1a8a3f..68131746730f5a785c4a71e36fc867e476f8f63a 100644 (file)
@@ -45,7 +45,7 @@ export const transformOn: DirectiveTransform = (dir, context) => {
 
   // handler processing
   if (dir.exp) {
-    // exp is guarunteed to be a simple expression here because v-on w/ arg is
+    // exp is guaranteed to be a simple expression here because v-on w/ arg is
     // skipped by transformExpression as a special case.
     let exp: ExpressionNode = dir.exp as SimpleExpressionNode
     const isInlineStatement = !(
index ff5b90238a986a6f03ca663f1f6b7ea53d7d61a0..fb9349f2e7590d94a11490f58a70f4c244738dad 100644 (file)
@@ -1,4 +1,4 @@
-// compiler should normlaize class + :class bindings on the same element
+// compiler should normalize class + :class bindings on the same element
 // into a single binding ['staticClass', dynamic]
 
 export function patchClass(el: Element, value: string, isSVG: boolean) {
index d9d03c5c4bae64b50fe4dbed1c5afa9e86ea4e05..a6fb086a63d41148e8fc0833639e38be8af6b604 100644 (file)
@@ -18,7 +18,7 @@ type EventValue = (Function | Function[]) & {
 let _getNow: () => number = Date.now
 
 // Determine what event timestamp the browser is using. Annoyingly, the
-// timestamp can either be hi-res ( relative to poge load) or low-res
+// timestamp can either be hi-res ( relative to page load) or low-res
 // (relative to UNIX epoch), so in order to compare time we have to use the
 // same timestamp type when saving the flush timestamp.
 if (
@@ -32,7 +32,7 @@ if (
 }
 
 // To avoid the overhead of repeatedly calling performance.now(), we cache
-// and use the same timestamp for all event listners attached in the same tick.
+// and use the same timestamp for all event listeners attached in the same tick.
 let cachedNow: number = 0
 const p = Promise.resolve()
 const reset = () => {
index 698aac0895895238730b87659a860e1ff50d1423..3bdee641a72939ad5d0da2860558d0891604f88a 100644 (file)
@@ -10,7 +10,7 @@
 //   const flag = TEXT | CLASS
 //   if (flag & TEXT) { ... }
 //
-// Check the `patchElement` function in './createRednerer.ts' to see how the
+// Check the `patchElement` function in './createRenderer.ts' to see how the
 // flags are handled during diff.
 
 export const enum PatchFlags {
@@ -42,7 +42,7 @@ export const enum PatchFlags {
 
   // Indicates an element that only needs non-props patching, e.g. ref or
   // directives (vnodeXXX hooks). It simply marks the vnode as "need patch",
-  // since every pathced vnode checks for refs and vnodeXXX hooks.
+  // since every patched vnode checks for refs and vnodeXXX hooks.
   // This flag is never directly matched against, it simply serves as a non-zero
   // value.
   NEED_PATCH = 1 << 5,