document terriable function

This commit is contained in:
MathMan05 2024-07-25 12:31:20 -05:00
parent 86bb5411dd
commit 0a1d2cfd26
2 changed files with 8 additions and 0 deletions

View file

@ -23,6 +23,10 @@ class SnowFlake {
SnowFlake.FinalizationRegistry.register(this, [id, obj.constructor]);
this.obj = obj;
}
/**
* Just to clarify bc TS, it returns a SnowFlake\<type> which is what you entered with the type parameter
*
**/
static getSnowFlakeFromID(id, type) {
if (!SnowFlake.SnowFlakes.get(type)) {
SnowFlake.SnowFlakes.set(type, new Map());