Skip to content

Commit 52f2d85

Browse files
committed
Fix internal type error
1 parent 5b70c18 commit 52f2d85

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ function one(state, node) {
137137
if (state.file && state.location) {
138138
const doc = String(state.file)
139139
const loc = location(doc)
140-
result.position = {start: loc.toPoint(0), end: loc.toPoint(doc.length)}
140+
const start = loc.toPoint(0)
141+
const end = loc.toPoint(doc.length)
142+
// @ts-expect-error: always defined as we give valid input.
143+
result.position = {start, end}
141144
}
142145

143146
return result

0 commit comments

Comments
 (0)