1
1
// Create global variables
2
2
3
+ // tslint:disable-next-line:no-namespace
3
4
declare namespace NodeJS {
4
5
interface Global {
5
6
mcLangLog : typeof mcLangLog ;
@@ -12,28 +13,23 @@ declare namespace NodeJS {
12
13
declare const mcLangSettings : McFunctionSettings ;
13
14
14
15
interface McFunctionSettings extends LocalMcFunctionSettings {
15
- /**
16
- * Settings related to information tracking
17
- */
18
- trace : {
19
- /**
20
- * Whether or not to show output from internal logging messages.
21
- */
22
- internalLogging : boolean ;
23
- } ;
24
- /**
25
- * Settings related to translating the server errors.
26
- */
27
- translation : {
28
- /**
29
- * The code for the language to be used.
30
- */
31
- lang : string ;
32
- } ;
33
16
/**
34
17
* Settings related to the collection of data.
35
18
*/
36
19
data : {
20
+ /**
21
+ * Global Scoped Setting
22
+ *
23
+ * __Advanced Users Only__
24
+ *
25
+ * The path to a custom (server) jar to attempt to extract data from.
26
+ *
27
+ * This is recommended for when working with mods,
28
+ * or past Minecraft versions (AFTER 1.13 Snapshot 18w01a) only.
29
+ *
30
+ * Note that not all mod parsers will be always supported, and features may change between snapshots.
31
+ */
32
+ customJar : string ;
37
33
/**
38
34
* Global Scoped Setting
39
35
*
@@ -54,19 +50,6 @@ interface McFunctionSettings extends LocalMcFunctionSettings {
54
50
* Disabled by default.
55
51
*/
56
52
enabled : boolean ;
57
- /**
58
- * Global Scoped Setting
59
- *
60
- * __Advanced Users Only__
61
- *
62
- * The path to a custom (server) jar to attempt to extract data from.
63
- *
64
- * This is recommended for when working with mods,
65
- * or past Minecraft versions (AFTER 1.13 Snapshot 18w01a) only.
66
- *
67
- * Note that not all mod parsers will be always supported, and features may change between snapshots.
68
- */
69
- customJar : string ;
70
53
/**
71
54
* Global Scoped Setting
72
55
*
@@ -89,6 +72,24 @@ interface McFunctionSettings extends LocalMcFunctionSettings {
89
72
parsers ?: {
90
73
[ name : string ] : import ( "./types" ) . Parser ;
91
74
} ;
75
+ /**
76
+ * Settings related to information tracking
77
+ */
78
+ trace : {
79
+ /**
80
+ * Whether or not to show output from internal logging messages.
81
+ */
82
+ internalLogging : boolean ;
83
+ } ;
84
+ /**
85
+ * Settings related to translating the server errors.
86
+ */
87
+ translation : {
88
+ /**
89
+ * The code for the language to be used.
90
+ */
91
+ lang : string ;
92
+ } ;
92
93
}
93
94
94
95
interface LocalMcFunctionSettings {
@@ -118,39 +119,13 @@ interface McLogger {
118
119
* This is disabled or enabled
119
120
* based on the "mcfunction.trace.internalLogging" setting
120
121
*/
121
- internal : ( message : string ) => void ;
122
+ internal ( message : string ) : void ;
122
123
}
123
124
/**
124
125
* An internal logging type to allow proper typing information to be used for mcLangLog.
125
126
*/
126
127
type InternalLog = ( message : string ) => void ;
127
128
128
- type Dictionary < T > = { [ key : string ] : T } ;
129
-
130
- // Type definitions for util.promisify 1.0
131
- // Project: https://github.com/ljharb/util.promisify#readme
132
- // Definitions by: Adam Voss <https://github.com/adamvoss>
133
- // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
134
-
135
- // Modified to exclude the redeclaration of util.promisify for this project
136
- declare module "util.promisify" {
137
- export = promisify ;
138
-
139
- function promisify (
140
- f : ( ...args : any [ ] ) => void
141
- ) : ( ...args : any [ ] ) => Promise < any > ;
142
-
143
- namespace promisify {
144
- interface implementation {
145
- ( fn : ( ...args : any [ ] ) => void ) : ( ...args : any [ ] ) => Promise < any > ;
146
- custom : symbol ;
147
- customPromisifyArgs : symbol | undefined ;
148
- }
149
-
150
- const custom : symbol ;
151
- const customPromisifyArgs : symbol ;
152
- function getPolyfill ( ) : implementation ;
153
- const implementation : implementation ;
154
- function shim ( ) : implementation ;
155
- }
129
+ interface Dictionary < T > {
130
+ [ key : string ] : T ;
156
131
}
0 commit comments