Skip to content

@loontail/minecraft-kit / RepairAspectSurface

Type Alias: RepairAspectSurface

ts
type RepairAspectSurface = {
  plan: Promise<RepairPlan>;
  run: Promise<InstallReport>;
};

Defined in: src/kit/repair-aspect.ts:92

Shared shape of every aspect-specific repair surface (repair.minecraft, .fabric, …).

Lives here rather than in src/types/repair.ts because its run signature references RepairRunOptions, which needs PauseController from src/core/.

Example

ts
import type { RepairAspectSurface } from "@loontail/minecraft-kit";

const runAll = async (aspect: RepairAspectSurface) => {
  const verification = await kit.verify.minecraft.run(target);
  const plan = await aspect.plan(target, { from: verification });
  return aspect.run(plan);
};
await runAll(kit.repair.minecraft);

Methods

plan()

ts
plan(target, options): Promise<RepairPlan>;

Defined in: src/kit/repair-aspect.ts:93

Parameters

ParameterType
targetTarget
optionsRepairPlanOptions

Returns

Promise<RepairPlan>


run()

ts
run(plan, options?): Promise<InstallReport>;

Defined in: src/kit/repair-aspect.ts:94

Parameters

ParameterType
planRepairPlan
options?InstallRunOptions

Returns

Promise<InstallReport>

MIT License