UNPKG

js-slang

Version:

Javascript-based implementations of Source, written in Typescript

11 lines (10 loc) 564 B
import type es from 'estree'; import { type NativeStorage } from '../types'; import { InfiniteLoopError } from './errors'; /** * Tests the given program for infinite loops. * @param program Program to test. * @param previousProgramsStack Any code previously entered in the REPL & parsed into AST. * @returns SourceError if an infinite loop was detected, undefined otherwise. */ export declare function testForInfiniteLoop(program: es.Program, previousProgramsStack: es.Program[], loadedModules: NativeStorage['loadedModules']): InfiniteLoopError | undefined;