(fn: () => Promise<void>)
| 1003 | }; |
| 1004 | |
| 1005 | const withEmitClose = async (fn: () => Promise<void>) => { |
| 1006 | try { |
| 1007 | await fn(); |
| 1008 | } finally { |
| 1009 | this.emitClose(); |
| 1010 | } |
| 1011 | }; |
| 1012 | |
| 1013 | const close = async () => { |
| 1014 | // if no session has been defined on the cursor, the cursor was never initialized |