From 3b8566149a70672f848aa8f91a0dfc7b12971262 Mon Sep 17 00:00:00 2001 From: ztplz Date: Sat, 9 Nov 2019 10:32:22 +0800 Subject: [PATCH] chore: improve type (#438) --- packages/shared/src/codeframe.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/src/codeframe.ts b/packages/shared/src/codeframe.ts index acea12bf..3ffb2808 100644 --- a/packages/shared/src/codeframe.ts +++ b/packages/shared/src/codeframe.ts @@ -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) {