]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: improve type (#438)
authorztplz <mysticzt@gmail.com>
Sat, 9 Nov 2019 02:32:22 +0000 (10:32 +0800)
committerEvan You <yyx990803@gmail.com>
Sat, 9 Nov 2019 02:32:22 +0000 (21:32 -0500)
packages/shared/src/codeframe.ts

index acea12bf018f270259fa6af77f40921b7ad0a0f8..3ffb2808ac55ca09dd5426598e074e51fa8a28c8 100644 (file)
@@ -7,7 +7,7 @@ export function generateCodeFrame(
 ): string {
   const lines = source.split(/\r?\n/)
   let count = 0
-  const res = []
+  const res: string[] = []
   for (let i = 0; i < lines.length; i++) {
     count += lines[i].length + 1
     if (count >= start) {