Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 702 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 702 Bytes

emplore js

Usage:

class item1 {
    public name = "a white staff";
}

class item2 {
    public name = "a fire spell";
}

class mage {
    constructor(first: item1, second: item2) {
        alert("a wild mage appears with " + first.name + " and " + second.name);
    }
}

register("item1", [], item1);
register("item2", [], item2);
register("mage", ["item1", "item2"], mage);

The main module does not need to return anything. The "window.onload" event starts the modules. All modules are registered as singletons. Create a factory module if you need multiple instances of a class.

license: MIT License, Copyright (c) 2017 webbersmak