@defold-typescript/library-types 0.22.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 (145) hide show
  1. package/api-doc/boom.json +3870 -0
  2. package/api-doc/{bridge.bridge.json → bridge.json} +754 -844
  3. package/api-doc/bzAnim.json +338 -0
  4. package/api-doc/decore.json +23 -23
  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 +249 -1846
  11. package/api-doc/event.json +1074 -0
  12. package/api-doc/gooey.json +2050 -0
  13. package/api-doc/immutable.json +65 -0
  14. package/api-doc/in.accelerometer.json +75 -1
  15. package/api-doc/in.button.json +17 -10
  16. package/api-doc/in.cursor.json +26 -0
  17. package/api-doc/in.gesture.json +401 -6
  18. package/api-doc/in.keyboard.json +2 -0
  19. package/api-doc/in.mapper.json +12 -8
  20. package/api-doc/in.onscreen.json +61 -5
  21. package/api-doc/in.state.json +61 -13
  22. package/api-doc/in.textbox.json +23 -12
  23. package/api-doc/in.triggers.json +336 -0
  24. package/api-doc/lang.json +528 -0
  25. package/api-doc/{event.event.json → log.json} +96 -101
  26. package/api-doc/metrics.fps.json +61 -2
  27. package/api-doc/metrics.mem.json +61 -2
  28. package/api-doc/monarch.monarch.json +249 -7
  29. package/api-doc/monarch.transitions.easings.json +19 -26
  30. package/api-doc/monarch.transitions.gui.json +782 -79
  31. package/api-doc/nakama.engine.defold.json +31 -18
  32. package/api-doc/{nakama.nakama.json → nakama.json} +4752 -2554
  33. package/api-doc/nakama.util.log.json +32 -4
  34. package/api-doc/narrator.json +647 -0
  35. package/api-doc/openapi/nakama.nakama.json +7680 -0
  36. package/api-doc/orthographic.camera.json +96 -98
  37. package/api-doc/orthographic.json +602 -0
  38. package/api-doc/panthera.json +1183 -0
  39. package/api-doc/{persist.persist.json → persist.json} +26 -1
  40. package/api-doc/{platypus.platypus.json → platypus.json} +68 -14
  41. package/api-doc/proto.json +995 -0
  42. package/api-doc/{rendy.rendy.json → rendy.json} +46 -99
  43. package/api-doc/richtext.color.json +77 -0
  44. package/api-doc/richtext.richtext.json +375 -5
  45. package/api-doc/saver.saver.json +714 -263
  46. package/api-doc/saver.storage.json +283 -52
  47. package/api-doc/squid.json +846 -0
  48. package/api-doc/{starly.starly.json → starly.json} +1 -1
  49. package/api-doc/tweener.json +277 -0
  50. package/api-doc/{yagames.yagames.json → yagames.json} +784 -189
  51. package/api-doc/{zzfx.api.json → zzfx.json} +9 -9
  52. package/authored-targets.json +403 -0
  53. package/generated/{boom.boom.d.ts → boom.d.ts} +14 -0
  54. package/generated/bridge.d.ts +468 -0
  55. package/generated/{bzAnim.bzLibrary.d.ts → bzAnim.d.ts} +6 -0
  56. package/generated/decore.d.ts +37 -37
  57. package/generated/defcon.d.ts +43 -0
  58. package/generated/{defmath.defmath.d.ts → defmath.d.ts} +3 -2
  59. package/generated/defsave.d.ts +144 -0
  60. package/generated/{dicebag.dicebag.d.ts → dicebag.d.ts} +25 -0
  61. package/generated/druid.d.ts +198 -502
  62. package/generated/event.d.ts +318 -0
  63. package/generated/{gooey.gooey.d.ts → gooey.d.ts} +61 -6
  64. package/generated/immutable.d.ts +13 -0
  65. package/generated/in.onscreen.d.ts +5 -0
  66. package/generated/in.textbox.d.ts +4 -0
  67. package/generated/lang.d.ts +101 -0
  68. package/generated/log.d.ts +36 -0
  69. package/generated/metrics.fps.d.ts +19 -1
  70. package/generated/metrics.mem.d.ts +19 -1
  71. package/generated/monarch.monarch.d.ts +44 -1
  72. package/generated/monarch.transitions.easings.d.ts +0 -1
  73. package/generated/monarch.transitions.gui.d.ts +96 -12
  74. package/generated/nakama.d.ts +1158 -0
  75. package/generated/nakama.engine.defold.d.ts +3 -1
  76. package/generated/nakama.util.log.d.ts +6 -0
  77. package/generated/narrator.d.ts +121 -0
  78. package/generated/openapi/nakama.nakama.d.ts +884 -0
  79. package/generated/orthographic.camera.d.ts +24 -38
  80. package/generated/orthographic.d.ts +155 -0
  81. package/generated/panthera.d.ts +170 -0
  82. package/generated/{persist.persist.d.ts → persist.d.ts} +3 -0
  83. package/generated/{platypus.platypus.d.ts → platypus.d.ts} +9 -0
  84. package/generated/proto.d.ts +146 -0
  85. package/generated/{rendy.rendy.d.ts → rendy.d.ts} +33 -80
  86. package/generated/richtext.color.d.ts +15 -0
  87. package/generated/saver.saver.d.ts +289 -42
  88. package/generated/saver.storage.d.ts +79 -14
  89. package/generated/squid.d.ts +127 -0
  90. package/generated/tweener.d.ts +42 -0
  91. package/generated/{yagames.yagames.d.ts → yagames.d.ts} +151 -29
  92. package/generated/{zzfx.api.d.ts → zzfx.d.ts} +7 -0
  93. package/library-classification.json +0 -227
  94. package/library-targets.json +1 -284
  95. package/luals-targets.json +168 -1
  96. package/openapi-targets.json +17 -0
  97. package/package.json +9 -88
  98. package/script-api-targets.json +15 -0
  99. package/scripts/__snapshots__/parse-luals.test.ts.snap +504 -85
  100. package/scripts/apply-luals-overrides.ts +95 -0
  101. package/scripts/authored-parity.ts +718 -0
  102. package/scripts/emit-library-dts.ts +177 -19
  103. package/scripts/extract-api-doc.ts +189 -38
  104. package/scripts/fidelity-floor.ts +178 -0
  105. package/scripts/import-upstream-docs.ts +125 -0
  106. package/scripts/lower-api-doc.ts +69 -19
  107. package/scripts/luals-fidelity.ts +22 -10
  108. package/scripts/map-luals-types.ts +86 -22
  109. package/scripts/parse-lua-surface.ts +187 -0
  110. package/scripts/parse-luals.ts +473 -22
  111. package/scripts/parse-markdown-api.ts +247 -0
  112. package/scripts/parse-openapi-api.ts +313 -0
  113. package/scripts/sync-authored-types.ts +249 -0
  114. package/scripts/sync-library-types.ts +99 -3
  115. package/scripts/sync-luals-types.ts +29 -2
  116. package/scripts/sync-markdown-types.ts +761 -0
  117. package/scripts/sync-openapi-types.ts +308 -0
  118. package/scripts/sync-script-api-types.ts +367 -0
  119. package/api-doc/boom.boom.json +0 -26
  120. package/api-doc/bzAnim.bzLibrary.json +0 -156
  121. package/api-doc/defcon.console.json +0 -109
  122. package/api-doc/defsave.defsave.json +0 -175
  123. package/api-doc/deftest.deftest.json +0 -71
  124. package/api-doc/gooey.gooey.json +0 -963
  125. package/api-doc/immutable.immutable.json +0 -63
  126. package/api-doc/lang.lang.json +0 -411
  127. package/api-doc/log.log.json +0 -50
  128. package/api-doc/narrator.narrator.json +0 -150
  129. package/api-doc/proto.proto.json +0 -355
  130. package/api-doc/squid.squid.json +0 -660
  131. package/api-doc/tweener.tweener.json +0 -419
  132. package/generated/bridge.bridge.d.ts +0 -533
  133. package/generated/defcon.console.d.ts +0 -24
  134. package/generated/defsave.defsave.d.ts +0 -31
  135. package/generated/event.event.d.ts +0 -54
  136. package/generated/immutable.immutable.d.ts +0 -13
  137. package/generated/lang.lang.d.ts +0 -33
  138. package/generated/log.log.d.ts +0 -40
  139. package/generated/nakama.nakama.d.ts +0 -594
  140. package/generated/narrator.narrator.d.ts +0 -66
  141. package/generated/proto.proto.d.ts +0 -36
  142. package/generated/squid.squid.d.ts +0 -106
  143. package/generated/tweener.tweener.d.ts +0 -151
  144. /package/generated/{deftest.deftest.d.ts → deftest.d.ts} +0 -0
  145. /package/generated/{starly.starly.d.ts → starly.d.ts} +0 -0
@@ -1,56 +1,59 @@
1
1
  {
2
2
  "info": {
3
- "namespace": "event.event",
4
- "brief": "Cross-Context Defold Event System",
5
- "description": "Cross-Context Defold Event System"
3
+ "namespace": "log",
4
+ "brief": "",
5
+ "description": ""
6
6
  },
7
7
  "elements": [
8
8
  {
9
9
  "type": "FUNCTION",
10
- "name": "set_logger",
11
- "brief": "",
12
- "description": "",
10
+ "name": "get_logger",
11
+ "brief": "Return the new logger instance",
12
+ "description": "Return the new logger instance",
13
13
  "parameters": [
14
14
  {
15
- "name": "logger",
15
+ "name": "logger_name",
16
16
  "doc": "",
17
17
  "types": [
18
- "LoggerInstance"
18
+ "string | undefined"
19
19
  ],
20
- "is_optional": "False"
21
- }
22
- ],
23
- "returnvalues": []
24
- },
25
- {
26
- "type": "FUNCTION",
27
- "name": "create",
28
- "brief": "Generate a new event instance. This instance can then be used to subscribe to and trigger events.",
29
- "description": "Generate a new event instance. This instance can then be used to subscribe to and trigger events.",
30
- "parameters": [
20
+ "is_optional": "True",
21
+ "is_vararg": "False"
22
+ },
31
23
  {
32
- "name": "this",
33
- "doc": "",
24
+ "name": "force_logger_level_in_debug",
25
+ "doc": "Default is DEBUG, values: FATAL, ERROR, WARN, INFO, DEBUG, TRACE",
34
26
  "types": [
35
- "void"
27
+ "string | undefined"
36
28
  ],
37
- "is_optional": "False"
38
- },
29
+ "is_optional": "True",
30
+ "is_vararg": "False"
31
+ }
32
+ ],
33
+ "returnvalues": [
39
34
  {
40
- "name": "callback",
35
+ "name": "",
41
36
  "doc": "",
42
37
  "types": [
43
- "(this: any) => void"
44
- ],
45
- "is_optional": "False"
46
- },
38
+ "logger"
39
+ ]
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "type": "FUNCTION",
45
+ "name": "get_default_logger_name",
46
+ "brief": "Return the basename of the current file",
47
+ "description": "Return the basename of the current file",
48
+ "parameters": [
47
49
  {
48
- "name": "callback_context",
50
+ "name": "debuginfo",
49
51
  "doc": "",
50
52
  "types": [
51
- "any"
53
+ "debug.FunctionInfo"
52
54
  ],
53
- "is_optional": "True"
55
+ "is_optional": "False",
56
+ "is_vararg": "False"
54
57
  }
55
58
  ],
56
59
  "returnvalues": [
@@ -58,44 +61,38 @@
58
61
  "name": "",
59
62
  "doc": "",
60
63
  "types": [
61
- "EventInstance"
64
+ "string"
62
65
  ]
63
66
  }
64
67
  ]
65
68
  },
66
69
  {
67
70
  "type": "TYPEDEF",
68
- "name": "LoggerInstance",
71
+ "name": "log",
69
72
  "functions": [
70
73
  {
71
74
  "type": "FUNCTION",
72
75
  "name": "trace",
73
- "brief": "",
74
- "description": "",
76
+ "brief": "Log message with TRACE level",
77
+ "description": "Log message with TRACE level",
75
78
  "parameters": [
76
- {
77
- "name": "this",
78
- "doc": "",
79
- "types": [
80
- "any"
81
- ],
82
- "is_optional": "False"
83
- },
84
79
  {
85
80
  "name": "message",
86
- "doc": "",
81
+ "doc": "Message to log",
87
82
  "types": [
88
83
  "string"
89
84
  ],
90
- "is_optional": "False"
85
+ "is_optional": "False",
86
+ "is_vararg": "False"
91
87
  },
92
88
  {
93
89
  "name": "data",
94
90
  "doc": "",
95
91
  "types": [
96
- "{}"
92
+ "unknown"
97
93
  ],
98
- "is_optional": "True"
94
+ "is_optional": "False",
95
+ "is_vararg": "False"
99
96
  }
100
97
  ],
101
98
  "returnvalues": []
@@ -103,32 +100,26 @@
103
100
  {
104
101
  "type": "FUNCTION",
105
102
  "name": "debug",
106
- "brief": "",
107
- "description": "",
103
+ "brief": "Log message with DEBUG level",
104
+ "description": "Log message with DEBUG level",
108
105
  "parameters": [
109
- {
110
- "name": "this",
111
- "doc": "",
112
- "types": [
113
- "any"
114
- ],
115
- "is_optional": "False"
116
- },
117
106
  {
118
107
  "name": "message",
119
- "doc": "",
108
+ "doc": "Message to log",
120
109
  "types": [
121
110
  "string"
122
111
  ],
123
- "is_optional": "False"
112
+ "is_optional": "False",
113
+ "is_vararg": "False"
124
114
  },
125
115
  {
126
116
  "name": "data",
127
117
  "doc": "",
128
118
  "types": [
129
- "{}"
119
+ "unknown"
130
120
  ],
131
- "is_optional": "True"
121
+ "is_optional": "False",
122
+ "is_vararg": "False"
132
123
  }
133
124
  ],
134
125
  "returnvalues": []
@@ -136,32 +127,26 @@
136
127
  {
137
128
  "type": "FUNCTION",
138
129
  "name": "info",
139
- "brief": "",
140
- "description": "",
130
+ "brief": "Log message with INFO level",
131
+ "description": "Log message with INFO level",
141
132
  "parameters": [
142
- {
143
- "name": "this",
144
- "doc": "",
145
- "types": [
146
- "any"
147
- ],
148
- "is_optional": "False"
149
- },
150
133
  {
151
134
  "name": "message",
152
135
  "doc": "",
153
136
  "types": [
154
137
  "string"
155
138
  ],
156
- "is_optional": "False"
139
+ "is_optional": "False",
140
+ "is_vararg": "False"
157
141
  },
158
142
  {
159
143
  "name": "data",
160
144
  "doc": "",
161
145
  "types": [
162
- "{}"
146
+ "unknown"
163
147
  ],
164
- "is_optional": "True"
148
+ "is_optional": "False",
149
+ "is_vararg": "False"
165
150
  }
166
151
  ],
167
152
  "returnvalues": []
@@ -169,32 +154,26 @@
169
154
  {
170
155
  "type": "FUNCTION",
171
156
  "name": "warn",
172
- "brief": "",
173
- "description": "",
157
+ "brief": "Log message with WARN level",
158
+ "description": "Log message with WARN level",
174
159
  "parameters": [
175
- {
176
- "name": "this",
177
- "doc": "",
178
- "types": [
179
- "any"
180
- ],
181
- "is_optional": "False"
182
- },
183
160
  {
184
161
  "name": "message",
185
162
  "doc": "",
186
163
  "types": [
187
164
  "string"
188
165
  ],
189
- "is_optional": "False"
166
+ "is_optional": "False",
167
+ "is_vararg": "False"
190
168
  },
191
169
  {
192
170
  "name": "data",
193
171
  "doc": "",
194
172
  "types": [
195
- "{}"
173
+ "unknown"
196
174
  ],
197
- "is_optional": "True"
175
+ "is_optional": "False",
176
+ "is_vararg": "False"
198
177
  }
199
178
  ],
200
179
  "returnvalues": []
@@ -202,37 +181,53 @@
202
181
  {
203
182
  "type": "FUNCTION",
204
183
  "name": "error",
205
- "brief": "",
206
- "description": "",
184
+ "brief": "Log message with ERROR level",
185
+ "description": "Log message with ERROR level",
207
186
  "parameters": [
208
- {
209
- "name": "this",
210
- "doc": "",
211
- "types": [
212
- "any"
213
- ],
214
- "is_optional": "False"
215
- },
216
187
  {
217
188
  "name": "message",
218
189
  "doc": "",
219
190
  "types": [
220
191
  "string"
221
192
  ],
222
- "is_optional": "False"
193
+ "is_optional": "False",
194
+ "is_vararg": "False"
223
195
  },
224
196
  {
225
197
  "name": "data",
226
198
  "doc": "",
227
199
  "types": [
228
- "{}"
200
+ "unknown"
229
201
  ],
230
- "is_optional": "True"
202
+ "is_optional": "False",
203
+ "is_vararg": "False"
231
204
  }
232
205
  ],
233
206
  "returnvalues": []
234
207
  }
208
+ ],
209
+ "properties": [
210
+ {
211
+ "name": "name",
212
+ "brief": "",
213
+ "description": "",
214
+ "types": [
215
+ "string"
216
+ ]
217
+ },
218
+ {
219
+ "name": "level",
220
+ "brief": "",
221
+ "description": "",
222
+ "types": [
223
+ "string"
224
+ ]
225
+ }
235
226
  ]
227
+ },
228
+ {
229
+ "type": "TYPEDEF",
230
+ "name": "logger"
236
231
  }
237
232
  ]
238
233
  }
@@ -5,6 +5,33 @@
5
5
  "description": ""
6
6
  },
7
7
  "elements": [
8
+ {
9
+ "type": "VARIABLE",
10
+ "name": "POSITION",
11
+ "brief": "Where `draw()` places the text, and the default `create()` uses when given no position.",
12
+ "description": "Where `draw()` places the text, and the default `create()` uses when given no position.",
13
+ "types": [
14
+ "Vector3"
15
+ ]
16
+ },
17
+ {
18
+ "type": "VARIABLE",
19
+ "name": "FORMAT",
20
+ "brief": "The `string.format` pattern the FPS reading is rendered through.",
21
+ "description": "The `string.format` pattern the FPS reading is rendered through.",
22
+ "types": [
23
+ "string"
24
+ ]
25
+ },
26
+ {
27
+ "type": "VARIABLE",
28
+ "name": "COLOR",
29
+ "brief": "The colour `draw()` renders the text in, and the default `create()` uses when given no colour.",
30
+ "description": "The colour `draw()` renders the text in, and the default `create()` uses when given no colour.",
31
+ "types": [
32
+ "Vector4"
33
+ ]
34
+ },
8
35
  {
9
36
  "type": "FUNCTION",
10
37
  "name": "create",
@@ -31,7 +58,7 @@
31
58
  "name": "position",
32
59
  "doc": "",
33
60
  "types": [
34
- "string"
61
+ "Vector3"
35
62
  ],
36
63
  "is_optional": "True"
37
64
  },
@@ -39,7 +66,7 @@
39
66
  "name": "color",
40
67
  "doc": "",
41
68
  "types": [
42
- "string"
69
+ "Vector4"
43
70
  ],
44
71
  "is_optional": "True"
45
72
  }
@@ -54,6 +81,38 @@
54
81
  }
55
82
  ]
56
83
  },
84
+ {
85
+ "type": "FUNCTION",
86
+ "name": "update",
87
+ "brief": "Call this once per frame. Once enough samples have been collected it is possible to call fps() to get the current FPS.",
88
+ "description": "Call this once per frame. Once enough samples have been collected it is possible to call fps() to get the current FPS.",
89
+ "parameters": [],
90
+ "returnvalues": []
91
+ },
92
+ {
93
+ "type": "FUNCTION",
94
+ "name": "fps",
95
+ "brief": "Get the current FPS, based on collected samples.",
96
+ "description": "Get the current FPS, based on collected samples.",
97
+ "parameters": [],
98
+ "returnvalues": [
99
+ {
100
+ "name": "",
101
+ "doc": "",
102
+ "types": [
103
+ "number"
104
+ ]
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "type": "FUNCTION",
110
+ "name": "draw",
111
+ "brief": "Draw fps count text using `draw_debug_text`.",
112
+ "description": "Draw fps count text using `draw_debug_text`.",
113
+ "parameters": [],
114
+ "returnvalues": []
115
+ },
57
116
  {
58
117
  "type": "TYPEDEF",
59
118
  "name": "Metrics",
@@ -5,6 +5,33 @@
5
5
  "description": ""
6
6
  },
7
7
  "elements": [
8
+ {
9
+ "type": "VARIABLE",
10
+ "name": "POSITION",
11
+ "brief": "Where `draw()` places the text, and the default `create()` uses when given no position.",
12
+ "description": "Where `draw()` places the text, and the default `create()` uses when given no position.",
13
+ "types": [
14
+ "Vector3"
15
+ ]
16
+ },
17
+ {
18
+ "type": "VARIABLE",
19
+ "name": "FORMAT",
20
+ "brief": "The `string.format` pattern the memory reading is rendered through.",
21
+ "description": "The `string.format` pattern the memory reading is rendered through.",
22
+ "types": [
23
+ "string"
24
+ ]
25
+ },
26
+ {
27
+ "type": "VARIABLE",
28
+ "name": "COLOR",
29
+ "brief": "The colour `draw()` renders the text in, and the default `create()` uses when given no colour.",
30
+ "description": "The colour `draw()` renders the text in, and the default `create()` uses when given no colour.",
31
+ "types": [
32
+ "Vector4"
33
+ ]
34
+ },
8
35
  {
9
36
  "type": "FUNCTION",
10
37
  "name": "create",
@@ -23,7 +50,7 @@
23
50
  "name": "position",
24
51
  "doc": "",
25
52
  "types": [
26
- "string"
53
+ "Vector3"
27
54
  ],
28
55
  "is_optional": "True"
29
56
  },
@@ -31,7 +58,7 @@
31
58
  "name": "color",
32
59
  "doc": "",
33
60
  "types": [
34
- "string"
61
+ "Vector4"
35
62
  ],
36
63
  "is_optional": "True"
37
64
  }
@@ -46,6 +73,38 @@
46
73
  }
47
74
  ]
48
75
  },
76
+ {
77
+ "type": "FUNCTION",
78
+ "name": "update",
79
+ "brief": "Call this to get a new memory usage reading.",
80
+ "description": "Call this to get a new memory usage reading.",
81
+ "parameters": [],
82
+ "returnvalues": []
83
+ },
84
+ {
85
+ "type": "FUNCTION",
86
+ "name": "mem",
87
+ "brief": "Get the current memory usage, in kilobytes.",
88
+ "description": "Get the current memory usage, in kilobytes.",
89
+ "parameters": [],
90
+ "returnvalues": [
91
+ {
92
+ "name": "",
93
+ "doc": "",
94
+ "types": [
95
+ "number"
96
+ ]
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ "type": "FUNCTION",
102
+ "name": "draw",
103
+ "brief": "Draw memory usage text using `draw_debug_text`.",
104
+ "description": "Draw memory usage text using `draw_debug_text`.",
105
+ "parameters": [],
106
+ "returnvalues": []
107
+ },
49
108
  {
50
109
  "type": "TYPEDEF",
51
110
  "name": "Metrics",