Seeking a way to make my Input module accessible globally without the need for explicit path definitions. Currently, I have to import it like this:
import { Input } from "./Input/Input";
. Is there a method to simplify the import statement for modules containing abstract classes, allowing it to look more like this: import { Input } from "Input";
, regardless of the module's location in the project? Alternatively, is there a way to achieve this without an import statement at all?
import { KeyboardInput } from "./KeyboardInput";
import { TouchInput } from "./TouchInput";
import { MouseInput } from "./MouseInput";
abstract class Input {
static keyboard: KeyboardInput;
static touchInput: TouchInput;
static mouseInput: MouseInput;
static initialize() {
Input.keyboard = new KeyboardInput();
Input.touchInput = new TouchInput();
Input.mouseInput = new MouseInput();
}
}
export { Input };