@defold-typescript/library-types 0.21.1 → 0.23.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 (56) hide show
  1. package/api-doc/{bridge.bridge.json → bridge.json} +749 -844
  2. package/api-doc/decore.json +22 -22
  3. package/api-doc/druid.json +195 -1790
  4. package/api-doc/event.json +1074 -0
  5. package/api-doc/immutable.json +65 -0
  6. package/api-doc/lang.json +528 -0
  7. package/api-doc/{event.event.json → log.json} +96 -101
  8. package/api-doc/narrator.json +647 -0
  9. package/api-doc/proto.json +995 -0
  10. package/api-doc/saver.saver.json +713 -263
  11. package/api-doc/saver.storage.json +282 -52
  12. package/api-doc/squid.json +846 -0
  13. package/api-doc/tweener.json +277 -0
  14. package/generated/bridge.d.ts +468 -0
  15. package/generated/decore.d.ts +36 -36
  16. package/generated/druid.d.ts +137 -443
  17. package/generated/event.d.ts +318 -0
  18. package/generated/immutable.d.ts +13 -0
  19. package/generated/lang.d.ts +101 -0
  20. package/generated/log.d.ts +36 -0
  21. package/generated/narrator.d.ts +121 -0
  22. package/generated/proto.d.ts +146 -0
  23. package/generated/saver.saver.d.ts +287 -42
  24. package/generated/saver.storage.d.ts +77 -14
  25. package/generated/squid.d.ts +127 -0
  26. package/generated/tweener.d.ts +42 -0
  27. package/library-classification.json +0 -71
  28. package/library-targets.json +0 -66
  29. package/luals-targets.json +114 -0
  30. package/package.json +4 -33
  31. package/script-api-targets.json +15 -0
  32. package/scripts/__snapshots__/parse-luals.test.ts.snap +340 -75
  33. package/scripts/apply-luals-overrides.ts +63 -0
  34. package/scripts/emit-library-dts.ts +84 -3
  35. package/scripts/lower-api-doc.ts +48 -16
  36. package/scripts/luals-fidelity.ts +7 -0
  37. package/scripts/map-luals-types.ts +34 -1
  38. package/scripts/parse-luals.ts +423 -18
  39. package/scripts/sync-luals-types.ts +15 -1
  40. package/scripts/sync-script-api-types.ts +368 -0
  41. package/api-doc/immutable.immutable.json +0 -63
  42. package/api-doc/lang.lang.json +0 -411
  43. package/api-doc/log.log.json +0 -50
  44. package/api-doc/narrator.narrator.json +0 -150
  45. package/api-doc/proto.proto.json +0 -355
  46. package/api-doc/squid.squid.json +0 -660
  47. package/api-doc/tweener.tweener.json +0 -419
  48. package/generated/bridge.bridge.d.ts +0 -533
  49. package/generated/event.event.d.ts +0 -54
  50. package/generated/immutable.immutable.d.ts +0 -13
  51. package/generated/lang.lang.d.ts +0 -33
  52. package/generated/log.log.d.ts +0 -40
  53. package/generated/narrator.narrator.d.ts +0 -66
  54. package/generated/proto.proto.d.ts +0 -36
  55. package/generated/squid.squid.d.ts +0 -106
  56. package/generated/tweener.tweener.d.ts +0 -151
@@ -0,0 +1,277 @@
1
+ {
2
+ "info": {
3
+ "namespace": "tweener",
4
+ "brief": "A tweener module to manage tweening operations. Tween functions are based on the Defold timer.delay function.",
5
+ "description": "A tweener module to manage tweening operations. Tween functions are based on the Defold timer.delay function.\nUse `tweener.tween` to create a tween, and `tweener.ease` to get the result of an easing function.\nYou can track the final call of tween by last parameter of the callback function."
6
+ },
7
+ "elements": [
8
+ {
9
+ "type": "FUNCTION",
10
+ "name": "tween",
11
+ "brief": "Starts a tweening operation. Return a tween object to manage the tween.",
12
+ "description": "Starts a tweening operation. Return a tween object to manage the tween.",
13
+ "parameters": [
14
+ {
15
+ "name": "easing_function",
16
+ "doc": "The easing function to use",
17
+ "types": [
18
+ "easing_function"
19
+ ],
20
+ "is_optional": "False",
21
+ "is_vararg": "False"
22
+ },
23
+ {
24
+ "name": "from",
25
+ "doc": "The starting value to tween from",
26
+ "types": [
27
+ "number"
28
+ ],
29
+ "is_optional": "False",
30
+ "is_vararg": "False"
31
+ },
32
+ {
33
+ "name": "to",
34
+ "doc": "The target value to tween to",
35
+ "types": [
36
+ "number"
37
+ ],
38
+ "is_optional": "False",
39
+ "is_vararg": "False"
40
+ },
41
+ {
42
+ "name": "time",
43
+ "doc": "The duration of the tween in seconds, default is 1",
44
+ "types": [
45
+ "number | undefined"
46
+ ],
47
+ "is_optional": "False",
48
+ "is_vararg": "False"
49
+ },
50
+ {
51
+ "name": "callback",
52
+ "doc": "The callback function to call on each update",
53
+ "types": [
54
+ "(value: number, is_end: boolean, time_elapsed: number, time_total: number) => void"
55
+ ],
56
+ "is_optional": "False",
57
+ "is_vararg": "False"
58
+ },
59
+ {
60
+ "name": "update_delta_time",
61
+ "doc": "Default is 1/60, the time between updates",
62
+ "types": [
63
+ "number | undefined"
64
+ ],
65
+ "is_optional": "True",
66
+ "is_vararg": "False"
67
+ }
68
+ ],
69
+ "returnvalues": [
70
+ {
71
+ "name": "",
72
+ "doc": "A new created tween state",
73
+ "types": [
74
+ "tween"
75
+ ]
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "type": "FUNCTION",
81
+ "name": "ease",
82
+ "brief": "Returns the result of an easing function.",
83
+ "description": "Returns the result of an easing function.",
84
+ "parameters": [
85
+ {
86
+ "name": "easing_function",
87
+ "doc": "",
88
+ "types": [
89
+ "easing_function"
90
+ ],
91
+ "is_optional": "False",
92
+ "is_vararg": "False"
93
+ },
94
+ {
95
+ "name": "from",
96
+ "doc": "",
97
+ "types": [
98
+ "number"
99
+ ],
100
+ "is_optional": "False",
101
+ "is_vararg": "False"
102
+ },
103
+ {
104
+ "name": "to",
105
+ "doc": "",
106
+ "types": [
107
+ "number"
108
+ ],
109
+ "is_optional": "False",
110
+ "is_vararg": "False"
111
+ },
112
+ {
113
+ "name": "time",
114
+ "doc": "The duration of the tween in seconds, default is 1",
115
+ "types": [
116
+ "number | undefined"
117
+ ],
118
+ "is_optional": "False",
119
+ "is_vararg": "False"
120
+ },
121
+ {
122
+ "name": "time_elapsed",
123
+ "doc": "current time [0 .. t - from]",
124
+ "types": [
125
+ "number"
126
+ ],
127
+ "is_optional": "False",
128
+ "is_vararg": "False"
129
+ }
130
+ ],
131
+ "returnvalues": [
132
+ {
133
+ "name": "",
134
+ "doc": "The result of easing",
135
+ "types": [
136
+ "number"
137
+ ]
138
+ }
139
+ ]
140
+ },
141
+ {
142
+ "type": "FUNCTION",
143
+ "name": "is_active",
144
+ "brief": "Check if a tween exists",
145
+ "description": "Check if a tween exists",
146
+ "parameters": [
147
+ {
148
+ "name": "tween",
149
+ "doc": "the tween handle returned by `tween` function",
150
+ "types": [
151
+ "tween"
152
+ ],
153
+ "is_optional": "False",
154
+ "is_vararg": "False"
155
+ }
156
+ ],
157
+ "returnvalues": [
158
+ {
159
+ "name": "",
160
+ "doc": "if the tween is active, false if the tween finished",
161
+ "types": [
162
+ "boolean"
163
+ ]
164
+ }
165
+ ]
166
+ },
167
+ {
168
+ "type": "FUNCTION",
169
+ "name": "cancel",
170
+ "brief": "Cancel a previous running tween.",
171
+ "description": "Cancel a previous running tween.",
172
+ "parameters": [
173
+ {
174
+ "name": "tween",
175
+ "doc": "the tween handle returned by `tween` function",
176
+ "types": [
177
+ "tween | undefined"
178
+ ],
179
+ "is_optional": "True",
180
+ "is_vararg": "False"
181
+ }
182
+ ],
183
+ "returnvalues": [
184
+ {
185
+ "name": "",
186
+ "doc": "if the tween was active, false if the tween is already cancelled / complete",
187
+ "types": [
188
+ "boolean"
189
+ ]
190
+ }
191
+ ]
192
+ },
193
+ {
194
+ "type": "FUNCTION",
195
+ "name": "is_paused",
196
+ "brief": "Check if a tween is paused",
197
+ "description": "Check if a tween is paused",
198
+ "parameters": [
199
+ {
200
+ "name": "tween",
201
+ "doc": "the tween handle returned by `tween` function",
202
+ "types": [
203
+ "tween"
204
+ ],
205
+ "is_optional": "False",
206
+ "is_vararg": "False"
207
+ }
208
+ ],
209
+ "returnvalues": [
210
+ {
211
+ "name": "",
212
+ "doc": "true if the tween is active and paused, false if the tween is running",
213
+ "types": [
214
+ "boolean"
215
+ ]
216
+ }
217
+ ]
218
+ },
219
+ {
220
+ "type": "FUNCTION",
221
+ "name": "set_pause",
222
+ "brief": "Sets the pause on a running tween.",
223
+ "description": "Sets the pause on a running tween.",
224
+ "parameters": [
225
+ {
226
+ "name": "tween",
227
+ "doc": "the tween handle returned by `tween` function",
228
+ "types": [
229
+ "tween"
230
+ ],
231
+ "is_optional": "False",
232
+ "is_vararg": "False"
233
+ },
234
+ {
235
+ "name": "is_paused",
236
+ "doc": "the tween paused state",
237
+ "types": [
238
+ "boolean"
239
+ ],
240
+ "is_optional": "False",
241
+ "is_vararg": "False"
242
+ }
243
+ ],
244
+ "returnvalues": []
245
+ },
246
+ {
247
+ "type": "TYPEDEF",
248
+ "name": "tween",
249
+ "properties": [
250
+ {
251
+ "name": "timer_id",
252
+ "brief": "The timer id handle from the `timer.delay` function",
253
+ "description": "The timer id handle from the `timer.delay` function",
254
+ "types": [
255
+ "number"
256
+ ]
257
+ },
258
+ {
259
+ "name": "is_paused",
260
+ "brief": "Whether the tween is paused",
261
+ "description": "Whether the tween is paused",
262
+ "types": [
263
+ "boolean"
264
+ ]
265
+ }
266
+ ]
267
+ },
268
+ {
269
+ "type": "TYPEDEF",
270
+ "name": "tweener"
271
+ },
272
+ {
273
+ "type": "TYPEDEF",
274
+ "name": "easing_function"
275
+ }
276
+ ]
277
+ }