import { Node , ESTree } from "../../Node" ; import { BaseClosure , } from '../../Closure' ; import { Messages } from '../../Message' ; import { Interpreter } from '../../../interpreter/main' ; export function spreadElementHandler ( this , node ) { let closure = this . createClosure ( node . argument ) ; return ( ) => { const data = closure ( ) ; const MArray = this . globalScope . data [ 'Array' ] ; if ( ! Array . isArray ( data ) ) { throw this . createInternalThrowError ( Messages . NormalError , `spread node type not array` , node ) ; } return data ; } ; }