(code:string)
| 112 | } |
| 113 | |
| 114 | public eval(code:string):void { |
| 115 | if (!this._isAvailable) { |
| 116 | throw new Error('Worker not available yet!'); |
| 117 | } |
| 118 | this._worker.send({ |
| 119 | 'channel': '::eval', |
| 120 | 'payload': code |
| 121 | }); |
| 122 | } |
| 123 | |
| 124 | public reset():void { |
| 125 | this._isAvailable = false; |