소스 검색

types: improve typing (#313)

Carlos Rodrigues 6 년 전
부모
커밋
b54c05f751
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      packages/compiler-core/src/transforms/hoistStatic.ts

+ 2 - 2
packages/compiler-core/src/transforms/hoistStatic.ts

@@ -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) {