chore: improve type (#438)
This commit is contained in:
parent
7fa676e55f
commit
3b8566149a
@ -7,7 +7,7 @@ export function generateCodeFrame(
|
|||||||
): string {
|
): string {
|
||||||
const lines = source.split(/\r?\n/)
|
const lines = source.split(/\r?\n/)
|
||||||
let count = 0
|
let count = 0
|
||||||
const res = []
|
const res: string[] = []
|
||||||
for (let i = 0; i < lines.length; i++) {
|
for (let i = 0; i < lines.length; i++) {
|
||||||
count += lines[i].length + 1
|
count += lines[i].length + 1
|
||||||
if (count >= start) {
|
if (count >= start) {
|
||||||
|
Loading…
Reference in New Issue
Block a user