/** * These are scripts which are sent to the browser via an `/execute/` command. * @module */ /** * All functions must have a final parameter which is a {@linkcode AsyncCallback}. * * This is not expressible dynamically in TS, so I didn't do it */ export const AsyncScripts: Readonly<{ /** * @param {number|string} code * @param {string} key * @param {number} duration * @param {AsyncCallback} done * @returns {void} */ pressKey: (code: number | string, key: string, duration: number, done: AsyncCallback) => void; }>; /** * These are all synchronous */ export const SyncScripts: Readonly<{ exit: () => void; reset: () => void; }>; /** * The callback function passed to the script executed via `execute/async`. * * If this function was called without a parameter, it would respond still with `null` to the requester, * so we demand `null` at minimum here for consistency. */ export type AsyncCallback = (result: T extends undefined ? never : T) => void; //# sourceMappingURL=scripts.d.ts.map