Delete Enum class

This commit is contained in:
Jordan Irwin 2024-05-21 19:23:12 -07:00
parent 0ccc0ecf71
commit 0e4bca7399
No known key found for this signature in database
GPG key ID: E3E358C2F44C290A
2 changed files with 5 additions and 36 deletions

View file

@ -1,34 +0,0 @@
/***************************************************************************
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* published by the Free Software Foundation; either version 3 of the *
* License, or (at your option) any later version. *
* *
***************************************************************************/
import { AbstractEnum } from "./AbstractEnum";
/**
* Represents a string enumeration type.
*/
export class Enum extends AbstractEnum<string> {
/** String enumeration type must have a value. */
override readonly value!: string;
/**
* Creates a new string enumeration.
*
* @param value {string}
* String value representation of this instance.
*/
constructor(value: string) {
super(value);
}
}

View file

@ -10,7 +10,7 @@
* *
***************************************************************************/
import { Enum } from "../enum/Enum";
import { AbstractEnum } from "../enum/AbstractEnum";
/**
@ -18,7 +18,7 @@ import { Enum } from "../enum/Enum";
*
* NOTE: string names should match `games.stendhal.common.constants.SoundLayer`
*/
export class SoundLayer extends Enum {
export class SoundLayer extends AbstractEnum<string> {
/** Reference to layers. */
private static readonly layers: SoundLayer[] = [];
@ -29,6 +29,9 @@ export class SoundLayer extends Enum {
static readonly SFX = new SoundLayer("sfx");
static readonly GUI = new SoundLayer("gui");
/** Value is required. */
override readonly value!: string;
private constructor(value: string) {
super(value);