narrow type

This commit is contained in:
Chris Wanstrath 2025-10-26 12:29:14 -07:00
parent 9345c743ff
commit d3e83e17b2

View File

@ -3,7 +3,7 @@ import { parser } from '#parser/shrimp'
import { $ } from 'bun'
import { assert, errorMessage } from '#utils/utils'
import { Compiler } from '#compiler/compiler'
import { run, VM } from 'reefvm'
import { run, VM, type TypeScriptFunction } from 'reefvm'
import { treeToString, VMResultToValue } from '#utils/tree'
const regenerateParser = async () => {
@ -93,11 +93,7 @@ expect.extend({
}
},
async toEvaluateTo(
received: unknown,
expected: unknown,
globals: Record<string, any> = {}
) {
async toEvaluateTo(received: unknown, expected: unknown, globals: Record<string, any> = {}) {
assert(typeof received === 'string', 'toEvaluateTo can only be used with string values')
try {