From aef57c8da273c0729df78a743cb94c6caa4a7ef3 Mon Sep 17 00:00:00 2001 From: Kir_Antipov Date: Mon, 10 Apr 2023 11:58:19 +0000 Subject: [PATCH] Made an interface that splits CurseForge's "game versions" --- .../curseforge-game-version-union.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/platforms/curseforge/curseforge-game-version-union.ts diff --git a/src/platforms/curseforge/curseforge-game-version-union.ts b/src/platforms/curseforge/curseforge-game-version-union.ts new file mode 100644 index 0000000..f42d52d --- /dev/null +++ b/src/platforms/curseforge/curseforge-game-version-union.ts @@ -0,0 +1,21 @@ +import { JavaVersion } from "@/utils/java"; + +/** + * Represents a union of entities CurseForge treats as "game versions". + */ +export interface CurseForgeGameVersionUnion { + /** + * An array of supported game versions for this project version. + */ + game_versions?: string[]; + + /** + * An array of supported java versions for this project version. + */ + java_versions?: (string | JavaVersion)[]; + + /** + * The mod loaders that this version supports. + */ + loaders?: string[]; +}