Appearance
@loontail/minecraft-kit v0.8.14 / LaunchSession
Type alias: LaunchSession
ts
type LaunchSession: {
exited: Promise<LaunchExit>;
pid: number;
abort: void;
};Live handle for a running game process.
Example
ts
import type { LaunchSession } from "@loontail/minecraft-kit";
const session: LaunchSession = kit.launch.run(composition);
console.log("game pid:", session.pid);
process.once("SIGINT", () => session.abort("user-interrupt"));
const exit = await session.exited;Type declaration
| Member | Type | Description |
|---|---|---|
exited | Promise<LaunchExit> | Resolves with the exit code/signal when the process terminates. |
pid | number | Operating-system process id. |
abort | void | Best-effort cancel — sends SIGTERM, then SIGKILL after the grace period. |