2023-10-27 16:02:54 -04:00
|
|
|
/**
|
|
|
|
* The main entrypoint when using Deno as the runtime
|
|
|
|
*/
|
2023-11-08 15:53:14 -05:00
|
|
|
import { IRuntime } from '../common/types.ts';
|
2023-11-01 15:05:31 -04:00
|
|
|
|
2023-11-06 15:36:41 -05:00
|
|
|
export * from './terminal_io.ts';
|
2023-10-27 16:02:54 -04:00
|
|
|
|
2023-11-08 15:53:14 -05:00
|
|
|
export const onExit = (cb: () => void): void => {
|
|
|
|
globalThis.addEventListener('onbeforeunload', cb);
|
|
|
|
};
|
2023-10-27 16:02:54 -04:00
|
|
|
|
2023-11-08 15:53:14 -05:00
|
|
|
const DenoRuntime: IRuntime = {
|
|
|
|
onExit,
|
|
|
|
};
|
2023-11-06 18:49:29 -05:00
|
|
|
|
2023-11-08 15:53:14 -05:00
|
|
|
export default DenoRuntime;
|