chore: improve type (#438)

This commit is contained in:
ztplz 2019-11-09 10:32:22 +08:00 committed by Evan You
parent 7fa676e55f
commit 3b8566149a

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