1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-08-30 18:34:51 +00:00
Funkin/source/funkin/data/IRegistryEntry.hx
lemz1 14975212a9 macro
registry macro

Merge branch 'lemz1/registry-entry-data' into lemz1/registry-macro-stufff
2025-04-15 20:25:18 -04:00

22 lines
662 B
Haxe

package funkin.data;
/**
* An interface defining the necessary functions for a registry entry.
* A `String->Void` constructor is also mandatory, but enforced elsewhere.
* @param T The JSON data type of the registry entry.
*/
@:autoBuild(funkin.util.macro.RegistryMacro.buildEntry())
interface IRegistryEntry<T>
{
public final id:String;
// public function new(id:String):Void;
public function destroy():Void;
public function toString():String;
// Can't make an interface field private I guess.
public final _data:T;
// Can't make a static field required by an interface I guess.
// private static function _fetchData(id:String):Null<T>;
}