feat: require

This commit is contained in:
2025-06-05 14:12:20 +09:00
parent 0e488a836a
commit 7266278036
2 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "computercraft-ts", "name": "computercraft-ts",
"version": "1.0.12", "version": "1.0.13",
"description": "", "description": "",
"license": "ISC", "license": "ISC",
"author": "", "author": "",

9
types/index.d.ts vendored
View File

@@ -5,7 +5,7 @@
* Based on documentation from https://tweaked.cc/ * Based on documentation from https://tweaked.cc/
*/ */
export { }; export {};
/** @noSelf **/ /** @noSelf **/
declare global { declare global {
@@ -35,6 +35,13 @@ declare global {
*/ */
export function printError(...args: any[]): void; export function printError(...args: any[]): void;
/**
* Loads a lua module.
* @param name Name of the lua module
* @returns The module
*/
export function require(name: string): any;
/** /**
* Reads user input from the terminal. This automatically handles arrow keys, pasting, * Reads user input from the terminal. This automatically handles arrow keys, pasting,
* character replacement, history scrollback, auto-completion, and default values. * character replacement, history scrollback, auto-completion, and default values.