]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
types: improve typing (#313)
authorCarlos Rodrigues <david-181@hotmail.com>
Wed, 16 Oct 2019 14:15:03 +0000 (15:15 +0100)
committerEvan You <yyx990803@gmail.com>
Wed, 16 Oct 2019 14:15:03 +0000 (10:15 -0400)
packages/compiler-core/src/transforms/hoistStatic.ts

index 5743d68136cdeae7e81bf44181624705fda1be56..733c903fbcc9a72d1c986a9ae4fdf81ee714fa95 100644 (file)
@@ -104,7 +104,7 @@ function getPatchFlag(node: PlainElementNode): number | undefined {
     codegenNode = codegenNode.arguments[0]
   }
   const flag = codegenNode.arguments[3]
-  return flag ? parseInt(flag as string, 10) : undefined
+  return flag ? parseInt(flag, 10) : undefined
 }
 
 function isStaticNode(
@@ -117,7 +117,7 @@ function isStaticNode(
         return false
       }
       if (resultCache.has(node)) {
-        return resultCache.get(node) as boolean
+        return resultCache.get(node)!
       }
       const flag = getPatchFlag(node)
       if (!flag || flag === PatchFlags.TEXT) {