diff --git a/src/vm.ts b/src/vm.ts index f2dacba..9f66dad 100644 --- a/src/vm.ts +++ b/src/vm.ts @@ -26,9 +26,7 @@ export class VM { this.scope = new Scope() } - registerFunction(name: string, fn: NativeFunction | Function) { - // If it's already a NativeFunction, use it directly - // Otherwise, assume it's a JS function and wrap it + registerFunction(name: string, fn: Function) { const wrapped = isWrapped(fn) ? fn as NativeFunction : wrapNative(fn) this.nativeFunctions.set(name, wrapped) }