-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathengine.d.ts
More file actions
93 lines (88 loc) · 2.61 KB
/
engine.d.ts
File metadata and controls
93 lines (88 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/**
* @file Type declarations for global Minecraft script APIs that are not a part of separate native modules.
* @copyright Uspel 2024
* @license MIT
*/
interface Console {
/**
* Outputs a debugging message at the `info` log level. This functions in the same way as {@link console.info()} and {@link print()}.
*
* In order for this message to display in the content log GUI, you must have the `GUI Log Level` creator setting set to `Verbose` or `Info`.
*
* @example
* ```js
* console.log("Hello world!");
* ```
* `[Scripting][inform]-Hello world!`
*/
log(...args: any[]): void;
/**
* Outputs a debugging message at the `info` log level. This functions in the same way as {@link console.log()} and {@link print()}.
*
* In order for this message to display in the content log GUI, you must have the `GUI Log Level` creator setting set to `Verbose` or `Info`.
*
* @example
* ```js
* console.info("Hello world!");
* ```
* `[Scripting][inform]-Hello world!`
*/
info(...args: any[]): void;
/**
* Outputs a debugging message at the `warn` log level.
*
* In order for this message to display in the content log GUI, you must have the `GUI Log Level` creator setting set to `Verbose`, `Info` or `Warn`.
*
* @example
* ```js
* console.warn("Hello world!");
* ```
* `[Scripting][warning]-Hello world!`
*/
warn(...args: any[]): void;
/**
* Outputs a debugging message at the `error` log level.
*
* @example
* ```js
* console.error("Hello world!");
* ```
* `[Scripting][error]-Hello world!`
*/
error(...args: any[]): void;
}
declare var console: Console;
/**
* Outputs a debugging message at the `info` log level. This functions in the same way as {@link console.info()} and {@link console.log()}.
*
* In order for this message to display in the content log GUI, you must have the `GUI Log Level` creator setting set to `Verbose` or `Info`.
*
* @example
* ```js
* print("Hello world!");
* ```
* `[Scripting][inform]-Hello world!`
*/
declare function print(...args: any[]): void;
/**
* Evaluates JavaScript code and executes it.
*
* Requires the `script_eval` pack manifest capability.
*
* @param x A String value that contains valid JavaScript code.
*/
declare function eval(x: string): any;
interface FunctionConstructor {
/**
* Creates a new function.
*
* Requires the `script_eval` pack manifest capability.
*
* @param args A list of arguments the function accepts.
*/
new (...args: string[]): Function;
/**
* Requires the `script_eval` pack manifest capability.
*/
(...args: string[]): Function;
}