]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix typo Stringiable -> Stringifiable (#1200)
authorJian Zhang <dsonet@msn.com>
Mon, 18 May 2020 14:06:57 +0000 (07:06 -0700)
committerGitHub <noreply@github.com>
Mon, 18 May 2020 14:06:57 +0000 (10:06 -0400)
packages/compiler-dom/src/transforms/stringifyStatic.ts

index 310c03e66a240498080d81b7630fcf00b276ad51..a354dc2cdd9521e7afca71248ea13f1495f80108 100644 (file)
@@ -33,10 +33,10 @@ export const enum StringifyThresholds {
   NODE_COUNT = 20
 }
 
-type StringiableNode = PlainElementNode | TextCallNode
+type StringifiableNode = PlainElementNode | TextCallNode
 
 /**
- * Turn eligible hoisted static trees into stringied static nodes, e.g.
+ * Turn eligible hoisted static trees into stringified static nodes, e.g.
  *
  * ```js
  * const _hoisted_1 = createStaticVNode(`<div class="foo">bar</div>`)
@@ -61,7 +61,7 @@ type StringiableNode = PlainElementNode | TextCallNode
 export const stringifyStatic: HoistTransform = (children, context) => {
   let nc = 0 // current node count
   let ec = 0 // current element with binding count
-  const currentChunk: StringiableNode[] = []
+  const currentChunk: StringifiableNode[] = []
 
   const stringifyCurrentChunk = (currentIndex: number): number => {
     if (
@@ -101,7 +101,7 @@ export const stringifyStatic: HoistTransform = (children, context) => {
     const hoisted = getHoistedNode(child)
     if (hoisted) {
       // presence of hoisted means child must be a stringifiable node
-      const node = child as StringiableNode
+      const node = child as StringifiableNode
       const result = analyzeNode(node)
       if (result) {
         // node is stringifiable, record state
@@ -137,7 +137,7 @@ const isStringifiableAttr = (name: string) => {
 }
 
 const replaceHoist = (
-  node: StringiableNode,
+  node: StringifiableNode,
   replacement: JSChildNode | null,
   context: TransformContext
 ) => {
@@ -152,7 +152,7 @@ const replaceHoist = (
  *   - nc is the number of nodes inside
  *   - ec is the number of element with bindings inside
  */
-function analyzeNode(node: StringiableNode): [number, number] | false {
+function analyzeNode(node: StringifiableNode): [number, number] | false {
   if (node.type === NodeTypes.TEXT_CALL) {
     return [1, 0]
   }