mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-22 08:20:58 -05:00
Made enum that describes different mod loaders
This commit is contained in:
parent
184c337d90
commit
59f286e65e
1 changed files with 16 additions and 0 deletions
16
src/metadata/mod-loader-type.ts
Normal file
16
src/metadata/mod-loader-type.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
enum ModLoaderType {
|
||||
Fabric = 1,
|
||||
Forge,
|
||||
}
|
||||
|
||||
namespace ModLoaderType {
|
||||
export function getValues(): ModLoaderType[] {
|
||||
return <ModLoaderType[]>Object.values(ModLoaderType).filter(x => typeof x === "number");
|
||||
}
|
||||
|
||||
export function toString(target: ModLoaderType): string {
|
||||
return ModLoaderType[target] ?? target.toString();
|
||||
}
|
||||
}
|
||||
|
||||
export default ModLoaderType;
|
Loading…
Reference in a new issue