@defold-typescript/library-types 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/api-doc/boom.json +3870 -0
  2. package/api-doc/bridge.json +10 -5
  3. package/api-doc/bzAnim.json +338 -0
  4. package/api-doc/decore.json +1 -1
  5. package/api-doc/defcon.json +150 -0
  6. package/api-doc/{defmath.defmath.json → defmath.json} +6 -46
  7. package/api-doc/defsave.json +518 -0
  8. package/api-doc/deftest.json +741 -0
  9. package/api-doc/{dicebag.dicebag.json → dicebag.json} +19 -1
  10. package/api-doc/druid.json +90 -92
  11. package/api-doc/event.json +16 -16
  12. package/api-doc/gooey.json +2050 -0
  13. package/api-doc/in.accelerometer.json +75 -1
  14. package/api-doc/in.button.json +17 -10
  15. package/api-doc/in.cursor.json +26 -0
  16. package/api-doc/in.gesture.json +401 -6
  17. package/api-doc/in.keyboard.json +2 -0
  18. package/api-doc/in.mapper.json +12 -8
  19. package/api-doc/in.onscreen.json +61 -5
  20. package/api-doc/in.state.json +61 -13
  21. package/api-doc/in.textbox.json +23 -12
  22. package/api-doc/in.triggers.json +336 -0
  23. package/api-doc/lang.json +5 -5
  24. package/api-doc/log.json +1 -1
  25. package/api-doc/metrics.fps.json +61 -2
  26. package/api-doc/metrics.mem.json +61 -2
  27. package/api-doc/monarch.monarch.json +249 -7
  28. package/api-doc/monarch.transitions.easings.json +19 -26
  29. package/api-doc/monarch.transitions.gui.json +782 -79
  30. package/api-doc/nakama.engine.defold.json +31 -18
  31. package/api-doc/{nakama.nakama.json → nakama.json} +4752 -2554
  32. package/api-doc/nakama.util.log.json +32 -4
  33. package/api-doc/narrator.json +1 -1
  34. package/api-doc/openapi/nakama.nakama.json +7680 -0
  35. package/api-doc/orthographic.camera.json +96 -98
  36. package/api-doc/orthographic.json +602 -0
  37. package/api-doc/panthera.json +1183 -0
  38. package/api-doc/{persist.persist.json → persist.json} +26 -1
  39. package/api-doc/{platypus.platypus.json → platypus.json} +68 -14
  40. package/api-doc/{rendy.rendy.json → rendy.json} +46 -99
  41. package/api-doc/richtext.color.json +77 -0
  42. package/api-doc/richtext.richtext.json +375 -5
  43. package/api-doc/saver.saver.json +2 -1
  44. package/api-doc/saver.storage.json +2 -1
  45. package/api-doc/{starly.starly.json → starly.json} +1 -1
  46. package/api-doc/{yagames.yagames.json → yagames.json} +784 -189
  47. package/api-doc/{zzfx.api.json → zzfx.json} +9 -9
  48. package/authored-targets.json +403 -0
  49. package/generated/{boom.boom.d.ts → boom.d.ts} +14 -0
  50. package/generated/bridge.d.ts +5 -5
  51. package/generated/{bzAnim.bzLibrary.d.ts → bzAnim.d.ts} +6 -0
  52. package/generated/decore.d.ts +1 -1
  53. package/generated/defcon.d.ts +43 -0
  54. package/generated/{defmath.defmath.d.ts → defmath.d.ts} +3 -2
  55. package/generated/defsave.d.ts +144 -0
  56. package/generated/{dicebag.dicebag.d.ts → dicebag.d.ts} +25 -0
  57. package/generated/druid.d.ts +81 -79
  58. package/generated/event.d.ts +15 -15
  59. package/generated/{gooey.gooey.d.ts → gooey.d.ts} +61 -6
  60. package/generated/in.onscreen.d.ts +5 -0
  61. package/generated/in.textbox.d.ts +4 -0
  62. package/generated/lang.d.ts +5 -5
  63. package/generated/log.d.ts +1 -1
  64. package/generated/metrics.fps.d.ts +19 -1
  65. package/generated/metrics.mem.d.ts +19 -1
  66. package/generated/monarch.monarch.d.ts +44 -1
  67. package/generated/monarch.transitions.easings.d.ts +0 -1
  68. package/generated/monarch.transitions.gui.d.ts +96 -12
  69. package/generated/nakama.d.ts +1158 -0
  70. package/generated/nakama.engine.defold.d.ts +3 -1
  71. package/generated/nakama.util.log.d.ts +6 -0
  72. package/generated/narrator.d.ts +1 -1
  73. package/generated/openapi/nakama.nakama.d.ts +884 -0
  74. package/generated/orthographic.camera.d.ts +24 -38
  75. package/generated/orthographic.d.ts +155 -0
  76. package/generated/panthera.d.ts +170 -0
  77. package/generated/{persist.persist.d.ts → persist.d.ts} +3 -0
  78. package/generated/{platypus.platypus.d.ts → platypus.d.ts} +9 -0
  79. package/generated/{rendy.rendy.d.ts → rendy.d.ts} +33 -80
  80. package/generated/richtext.color.d.ts +15 -0
  81. package/generated/saver.saver.d.ts +2 -0
  82. package/generated/saver.storage.d.ts +2 -0
  83. package/generated/{yagames.yagames.d.ts → yagames.d.ts} +151 -29
  84. package/generated/{zzfx.api.d.ts → zzfx.d.ts} +7 -0
  85. package/library-classification.json +0 -156
  86. package/library-targets.json +1 -218
  87. package/luals-targets.json +56 -3
  88. package/openapi-targets.json +17 -0
  89. package/package.json +7 -57
  90. package/scripts/__snapshots__/parse-luals.test.ts.snap +164 -10
  91. package/scripts/apply-luals-overrides.ts +39 -7
  92. package/scripts/authored-parity.ts +718 -0
  93. package/scripts/emit-library-dts.ts +94 -17
  94. package/scripts/extract-api-doc.ts +189 -38
  95. package/scripts/fidelity-floor.ts +178 -0
  96. package/scripts/import-upstream-docs.ts +125 -0
  97. package/scripts/lower-api-doc.ts +21 -3
  98. package/scripts/luals-fidelity.ts +16 -11
  99. package/scripts/map-luals-types.ts +52 -21
  100. package/scripts/parse-lua-surface.ts +187 -0
  101. package/scripts/parse-luals.ts +50 -4
  102. package/scripts/parse-markdown-api.ts +247 -0
  103. package/scripts/parse-openapi-api.ts +313 -0
  104. package/scripts/sync-authored-types.ts +249 -0
  105. package/scripts/sync-library-types.ts +99 -3
  106. package/scripts/sync-luals-types.ts +14 -1
  107. package/scripts/sync-markdown-types.ts +761 -0
  108. package/scripts/sync-openapi-types.ts +308 -0
  109. package/scripts/sync-script-api-types.ts +16 -17
  110. package/api-doc/boom.boom.json +0 -26
  111. package/api-doc/bzAnim.bzLibrary.json +0 -156
  112. package/api-doc/defcon.console.json +0 -109
  113. package/api-doc/defsave.defsave.json +0 -175
  114. package/api-doc/deftest.deftest.json +0 -71
  115. package/api-doc/gooey.gooey.json +0 -963
  116. package/generated/defcon.console.d.ts +0 -24
  117. package/generated/defsave.defsave.d.ts +0 -31
  118. package/generated/nakama.nakama.d.ts +0 -594
  119. /package/generated/{deftest.deftest.d.ts → deftest.d.ts} +0 -0
  120. /package/generated/{starly.starly.d.ts → starly.d.ts} +0 -0
@@ -37,7 +37,8 @@
37
37
  "name": "result",
38
38
  "doc": "",
39
39
  "types": [
40
- "string | nil"
40
+ "string",
41
+ "nil"
41
42
  ]
42
43
  }
43
44
  ]
@@ -52,7 +53,8 @@
52
53
  "name": "result",
53
54
  "doc": "",
54
55
  "types": [
55
- "string | nil"
56
+ "string",
57
+ "nil"
56
58
  ]
57
59
  }
58
60
  ]
@@ -82,7 +84,8 @@
82
84
  "name": "result",
83
85
  "doc": "",
84
86
  "types": [
85
- "string | nil"
87
+ "string",
88
+ "nil"
86
89
  ]
87
90
  }
88
91
  ]
@@ -684,7 +687,8 @@
684
687
  "name": "result",
685
688
  "doc": "",
686
689
  "types": [
687
- "string | nil"
690
+ "string",
691
+ "nil"
688
692
  ]
689
693
  }
690
694
  ]
@@ -699,7 +703,8 @@
699
703
  "name": "result",
700
704
  "doc": "",
701
705
  "types": [
702
- "string | nil"
706
+ "string",
707
+ "nil"
703
708
  ]
704
709
  }
705
710
  ]
@@ -0,0 +1,338 @@
1
+ {
2
+ "info": {
3
+ "namespace": "bzAnim",
4
+ "brief": "",
5
+ "description": ""
6
+ },
7
+ "elements": [
8
+ {
9
+ "type": "VARIABLE",
10
+ "name": "INFO_LEVEL",
11
+ "brief": "",
12
+ "description": "",
13
+ "types": []
14
+ },
15
+ {
16
+ "type": "VARIABLE",
17
+ "name": "DEBUG_LEVEL",
18
+ "brief": "",
19
+ "description": "",
20
+ "types": []
21
+ },
22
+ {
23
+ "type": "VARIABLE",
24
+ "name": "TRACE_LEVEL",
25
+ "brief": "",
26
+ "description": "",
27
+ "types": []
28
+ },
29
+ {
30
+ "type": "TYPEDEF",
31
+ "name": "Path",
32
+ "properties": [
33
+ {
34
+ "name": "x",
35
+ "brief": "",
36
+ "description": "",
37
+ "types": [
38
+ "number"
39
+ ]
40
+ },
41
+ {
42
+ "name": "y",
43
+ "brief": "",
44
+ "description": "",
45
+ "types": [
46
+ "number"
47
+ ]
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "type": "TYPEDEF",
53
+ "name": "Segment",
54
+ "properties": [
55
+ {
56
+ "name": "duration",
57
+ "brief": "",
58
+ "description": "",
59
+ "types": [
60
+ "number"
61
+ ]
62
+ },
63
+ {
64
+ "name": "delay",
65
+ "brief": "",
66
+ "description": "",
67
+ "types": [
68
+ "number"
69
+ ]
70
+ },
71
+ {
72
+ "name": "path",
73
+ "brief": "",
74
+ "description": "",
75
+ "types": [
76
+ "Array<Path>"
77
+ ]
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "type": "TYPEDEF",
83
+ "name": "AnimateArgs",
84
+ "properties": [
85
+ {
86
+ "name": "obj",
87
+ "brief": "",
88
+ "description": "",
89
+ "types": [
90
+ "Hash | string | undefined"
91
+ ]
92
+ },
93
+ {
94
+ "name": "easing",
95
+ "brief": "",
96
+ "description": "",
97
+ "types": [
98
+ "EASING_TYPES"
99
+ ]
100
+ },
101
+ {
102
+ "name": "duration",
103
+ "brief": "",
104
+ "description": "",
105
+ "types": [
106
+ "number"
107
+ ],
108
+ "is_optional": "True"
109
+ },
110
+ {
111
+ "name": "delay",
112
+ "brief": "",
113
+ "description": "",
114
+ "types": [
115
+ "number"
116
+ ],
117
+ "is_optional": "True"
118
+ },
119
+ {
120
+ "name": "path",
121
+ "brief": "",
122
+ "description": "",
123
+ "types": [
124
+ "Array<Path>"
125
+ ],
126
+ "is_optional": "True"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "type": "TYPEDEF",
132
+ "name": "AnimateSequenceArgs",
133
+ "properties": [
134
+ {
135
+ "name": "obj",
136
+ "brief": "",
137
+ "description": "",
138
+ "types": [
139
+ "Hash | string | undefined"
140
+ ]
141
+ },
142
+ {
143
+ "name": "easing",
144
+ "brief": "",
145
+ "description": "",
146
+ "types": [
147
+ "EASING_TYPES"
148
+ ]
149
+ },
150
+ {
151
+ "name": "segments",
152
+ "brief": "",
153
+ "description": "",
154
+ "types": [
155
+ "Array<Segment>"
156
+ ],
157
+ "is_optional": "True"
158
+ },
159
+ {
160
+ "name": "on_complete",
161
+ "brief": "",
162
+ "description": "",
163
+ "types": [
164
+ "boolean | string"
165
+ ],
166
+ "is_optional": "True"
167
+ }
168
+ ]
169
+ },
170
+ {
171
+ "type": "FUNCTION",
172
+ "name": "animate",
173
+ "brief": "",
174
+ "description": "",
175
+ "parameters": [
176
+ {
177
+ "name": "args",
178
+ "doc": "",
179
+ "types": [
180
+ "AnimateArgs"
181
+ ],
182
+ "is_optional": "False"
183
+ }
184
+ ],
185
+ "returnvalues": [
186
+ {
187
+ "name": "",
188
+ "doc": "",
189
+ "types": [
190
+ "string"
191
+ ]
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ "type": "FUNCTION",
197
+ "name": "animateSequence",
198
+ "brief": "",
199
+ "description": "",
200
+ "parameters": [
201
+ {
202
+ "name": "args",
203
+ "doc": "",
204
+ "types": [
205
+ "AnimateSequenceArgs"
206
+ ],
207
+ "is_optional": "False"
208
+ }
209
+ ],
210
+ "returnvalues": [
211
+ {
212
+ "name": "",
213
+ "doc": "",
214
+ "types": [
215
+ "string"
216
+ ]
217
+ }
218
+ ]
219
+ },
220
+ {
221
+ "type": "FUNCTION",
222
+ "name": "cancel",
223
+ "brief": "",
224
+ "description": "",
225
+ "parameters": [
226
+ {
227
+ "name": "id",
228
+ "doc": "",
229
+ "types": [
230
+ "string"
231
+ ],
232
+ "is_optional": "False"
233
+ }
234
+ ],
235
+ "returnvalues": []
236
+ },
237
+ {
238
+ "type": "FUNCTION",
239
+ "name": "info",
240
+ "brief": "",
241
+ "description": "",
242
+ "parameters": [],
243
+ "returnvalues": [
244
+ {
245
+ "name": "",
246
+ "doc": "",
247
+ "types": [
248
+ "string"
249
+ ]
250
+ }
251
+ ]
252
+ },
253
+ {
254
+ "type": "FUNCTION",
255
+ "name": "isReady",
256
+ "brief": "",
257
+ "description": "",
258
+ "parameters": [],
259
+ "returnvalues": [
260
+ {
261
+ "name": "",
262
+ "doc": "",
263
+ "types": [
264
+ "boolean"
265
+ ]
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "type": "FUNCTION",
271
+ "name": "setDebugLevel",
272
+ "brief": "",
273
+ "description": "",
274
+ "parameters": [
275
+ {
276
+ "name": "level",
277
+ "doc": "",
278
+ "types": [
279
+ "number"
280
+ ],
281
+ "is_optional": "False"
282
+ }
283
+ ],
284
+ "returnvalues": []
285
+ },
286
+ {
287
+ "type": "FUNCTION",
288
+ "name": "setMaxPoints",
289
+ "brief": "",
290
+ "description": "",
291
+ "parameters": [
292
+ {
293
+ "name": "num",
294
+ "doc": "",
295
+ "types": [
296
+ "number"
297
+ ],
298
+ "is_optional": "False"
299
+ }
300
+ ],
301
+ "returnvalues": []
302
+ },
303
+ {
304
+ "type": "FUNCTION",
305
+ "name": "registerController",
306
+ "brief": "",
307
+ "description": "",
308
+ "parameters": [
309
+ {
310
+ "name": "obj",
311
+ "doc": "",
312
+ "types": [
313
+ "Hash | string"
314
+ ],
315
+ "is_optional": "False"
316
+ }
317
+ ],
318
+ "returnvalues": []
319
+ },
320
+ {
321
+ "type": "FUNCTION",
322
+ "name": "unregisterController",
323
+ "brief": "",
324
+ "description": "",
325
+ "parameters": [
326
+ {
327
+ "name": "obj",
328
+ "doc": "",
329
+ "types": [
330
+ "Hash | string"
331
+ ],
332
+ "is_optional": "False"
333
+ }
334
+ ],
335
+ "returnvalues": []
336
+ }
337
+ ]
338
+ }
@@ -1544,7 +1544,7 @@
1544
1544
  "brief": "Creates a new world",
1545
1545
  "description": "Creates a new world",
1546
1546
  "types": [
1547
- "(...args: unknown[]) => LuaMultiReturn<[world, unknown]>"
1547
+ "(...args: unknown[]) => LuaMultiReturn<[world, ...unknown[]]>"
1548
1548
  ]
1549
1549
  },
1550
1550
  {
@@ -0,0 +1,150 @@
1
+ {
2
+ "info": {
3
+ "namespace": "defcon",
4
+ "brief": "",
5
+ "description": ""
6
+ },
7
+ "elements": [
8
+ {
9
+ "type": "VARIABLE",
10
+ "name": "print",
11
+ "brief": "The engine's own `print`, captured at load. `start()` replaces the global with a",
12
+ "description": "The engine's own `print`, captured at load. `start()` replaces the global with a\nlogging wrapper that calls this, and `stop()` restores the global from it.",
13
+ "types": [
14
+ "(...args: unknown[]) => void"
15
+ ]
16
+ },
17
+ {
18
+ "type": "VARIABLE",
19
+ "name": "pprint",
20
+ "brief": "The engine's own `pprint`, captured at load. `start()` replaces the global with a",
21
+ "description": "The engine's own `pprint`, captured at load. `start()` replaces the global with a\nlogging wrapper that calls this, and `stop()` restores the global from it.",
22
+ "types": [
23
+ "(...args: unknown[]) => void"
24
+ ]
25
+ },
26
+ {
27
+ "type": "VARIABLE",
28
+ "name": "server",
29
+ "brief": "The `defnet` http_server the console listens on. A router-only stand-in until",
30
+ "description": "The `defnet` http_server the console listens on. A router-only stand-in until\n`start()` creates the real one; opaque here, `defnet` not being vendored by this\ntarget.",
31
+ "types": [
32
+ "unknown"
33
+ ]
34
+ },
35
+ {
36
+ "type": "FUNCTION",
37
+ "name": "start",
38
+ "brief": "Start the console",
39
+ "description": "Start the console",
40
+ "docSource": "upstream",
41
+ "parameters": [
42
+ {
43
+ "name": "port",
44
+ "doc": "",
45
+ "types": [
46
+ "number"
47
+ ],
48
+ "is_optional": "False"
49
+ }
50
+ ],
51
+ "returnvalues": []
52
+ },
53
+ {
54
+ "type": "FUNCTION",
55
+ "name": "stop",
56
+ "brief": "Stop the server",
57
+ "description": "Stop the server",
58
+ "docSource": "upstream",
59
+ "parameters": [],
60
+ "returnvalues": []
61
+ },
62
+ {
63
+ "type": "FUNCTION",
64
+ "name": "update",
65
+ "brief": "Update the server",
66
+ "description": "Update the server\nPreferably call this once per frame",
67
+ "docSource": "upstream",
68
+ "parameters": [],
69
+ "returnvalues": []
70
+ },
71
+ {
72
+ "type": "FUNCTION",
73
+ "name": "register_module",
74
+ "brief": "Register a module. All functions on the module will be exposed to",
75
+ "description": "Register a module. All functions on the module will be exposed to\nthe console",
76
+ "docSource": "upstream",
77
+ "parameters": [
78
+ {
79
+ "name": "module",
80
+ "doc": "",
81
+ "types": [
82
+ "unknown"
83
+ ],
84
+ "is_optional": "False"
85
+ },
86
+ {
87
+ "name": "name",
88
+ "doc": "",
89
+ "types": [
90
+ "string"
91
+ ],
92
+ "is_optional": "True"
93
+ }
94
+ ],
95
+ "returnvalues": []
96
+ },
97
+ {
98
+ "type": "FUNCTION",
99
+ "name": "register_command",
100
+ "brief": "Register a console command",
101
+ "description": "Register a console command",
102
+ "docSource": "upstream",
103
+ "parameters": [
104
+ {
105
+ "name": "command",
106
+ "doc": "",
107
+ "types": [
108
+ "string"
109
+ ],
110
+ "is_optional": "False"
111
+ },
112
+ {
113
+ "name": "description",
114
+ "doc": "",
115
+ "types": [
116
+ "string"
117
+ ],
118
+ "is_optional": "False"
119
+ },
120
+ {
121
+ "name": "callback",
122
+ "doc": "",
123
+ "types": [
124
+ "CommandCallback"
125
+ ],
126
+ "is_optional": "False"
127
+ }
128
+ ],
129
+ "returnvalues": []
130
+ },
131
+ {
132
+ "type": "FUNCTION",
133
+ "name": "set_environment",
134
+ "brief": "Set the global environment table used for commands ran as Lua code and inspect.",
135
+ "description": "Set the global environment table used for commands ran as Lua code and inspect.",
136
+ "docSource": "upstream",
137
+ "parameters": [
138
+ {
139
+ "name": "env",
140
+ "doc": "",
141
+ "types": [
142
+ "unknown"
143
+ ],
144
+ "is_optional": "False"
145
+ }
146
+ ],
147
+ "returnvalues": []
148
+ }
149
+ ]
150
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "info": {
3
- "namespace": "defmath.defmath",
3
+ "namespace": "defmath",
4
4
  "brief": "",
5
5
  "description": ""
6
6
  },
@@ -1146,7 +1146,7 @@
1146
1146
  "type": "FUNCTION",
1147
1147
  "name": "in_triangle",
1148
1148
  "brief": "Used to find a point in a triangle",
1149
- "description": "Used to find a point in a triangle\nx0, y0 are the points that are being checked against the rest to see if it's inside",
1149
+ "description": "Used to find a point in a triangle\nx0, y0 are the points that are being checked against the rest to see if it's inside\narr must be 6 in length: top x/y, bottom right x/y, bottom left x/y",
1150
1150
  "parameters": [
1151
1151
  {
1152
1152
  "name": "x0",
@@ -1165,50 +1165,10 @@
1165
1165
  "is_optional": "False"
1166
1166
  },
1167
1167
  {
1168
- "name": "x1",
1169
- "doc": "",
1170
- "types": [
1171
- "number"
1172
- ],
1173
- "is_optional": "False"
1174
- },
1175
- {
1176
- "name": "y1",
1177
- "doc": "",
1178
- "types": [
1179
- "number"
1180
- ],
1181
- "is_optional": "False"
1182
- },
1183
- {
1184
- "name": "x2",
1185
- "doc": "",
1186
- "types": [
1187
- "number"
1188
- ],
1189
- "is_optional": "False"
1190
- },
1191
- {
1192
- "name": "y2",
1193
- "doc": "",
1194
- "types": [
1195
- "number"
1196
- ],
1197
- "is_optional": "False"
1198
- },
1199
- {
1200
- "name": "x3",
1201
- "doc": "",
1202
- "types": [
1203
- "number"
1204
- ],
1205
- "is_optional": "False"
1206
- },
1207
- {
1208
- "name": "y3",
1168
+ "name": "arr",
1209
1169
  "doc": "",
1210
1170
  "types": [
1211
- "number"
1171
+ "[ number, number, number, number, number, number ]"
1212
1172
  ],
1213
1173
  "is_optional": "False"
1214
1174
  }
@@ -1226,8 +1186,8 @@
1226
1186
  {
1227
1187
  "type": "FUNCTION",
1228
1188
  "name": "box_intersect",
1229
- "brief": "arr must be 6 in length: top x/y, bottom right x/y, bottom left x/y",
1230
- "description": "arr must be 6 in length: top x/y, bottom right x/y, bottom left x/y",
1189
+ "brief": "box intersection of 2 square",
1190
+ "description": "box intersection of 2 square",
1231
1191
  "parameters": [
1232
1192
  {
1233
1193
  "name": "ax",