@ts-defold/types 1.2.59 → 1.2.60
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.
- package/index.d.ts +205 -1
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="lua-types/5.1" />
|
|
3
3
|
/// <reference types="@typescript-to-lua/language-extensions" />
|
|
4
4
|
|
|
5
|
-
// DEFOLD. stable version 1.9.
|
|
5
|
+
// DEFOLD. stable version 1.9.7 (a1ae95286a1b2677ed3fda6785816e76df4ee8a2)
|
|
6
6
|
// =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
|
|
7
7
|
|
|
8
8
|
|
|
@@ -101,6 +101,191 @@ declare function pprint(v: any): void
|
|
|
101
101
|
// =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
declare namespace liveupdate {
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* LIVEUPDATE_BUNDLED_RESOURCE_MISMATCH
|
|
108
|
+
*/
|
|
109
|
+
export let LIVEUPDATE_BUNDLED_RESOURCE_MISMATCH: any
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* LIVEUPDATE_ENGINE_VERSION_MISMATCH
|
|
113
|
+
*/
|
|
114
|
+
export let LIVEUPDATE_ENGINE_VERSION_MISMATCH: any
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* LIVEUPDATE_FORMAT_ERROR
|
|
118
|
+
*/
|
|
119
|
+
export let LIVEUPDATE_FORMAT_ERROR: any
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* LIVEUPDATE_INVAL
|
|
123
|
+
*/
|
|
124
|
+
export let LIVEUPDATE_INVAL: any
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* LIVEUPDATE_INVALID_HEADER
|
|
128
|
+
*/
|
|
129
|
+
export let LIVEUPDATE_INVALID_HEADER: any
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* LIVEUPDATE_INVALID_RESOURCE
|
|
133
|
+
*/
|
|
134
|
+
export let LIVEUPDATE_INVALID_RESOURCE: any
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* LIVEUPDATE_IO_ERROR
|
|
138
|
+
*/
|
|
139
|
+
export let LIVEUPDATE_IO_ERROR: any
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* LIVEUPDATE_MEM_ERROR
|
|
143
|
+
*/
|
|
144
|
+
export let LIVEUPDATE_MEM_ERROR: any
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* LIVEUPDATE_OK
|
|
148
|
+
*/
|
|
149
|
+
export let LIVEUPDATE_OK: any
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* LIVEUPDATE_SCHEME_MISMATCH
|
|
153
|
+
*/
|
|
154
|
+
export let LIVEUPDATE_SCHEME_MISMATCH: any
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* LIVEUPDATE_SIGNATURE_MISMATCH
|
|
158
|
+
*/
|
|
159
|
+
export let LIVEUPDATE_SIGNATURE_MISMATCH: any
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* LIVEUPDATE_UNKNOWN
|
|
163
|
+
*/
|
|
164
|
+
export let LIVEUPDATE_UNKNOWN: any
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* LIVEUPDATE_VERSION_MISMATCH
|
|
168
|
+
*/
|
|
169
|
+
export let LIVEUPDATE_VERSION_MISMATCH: any
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Adds a resource mount to the resource system.
|
|
173
|
+
* The mounts are persisted between sessions.
|
|
174
|
+
* After the mount succeeded, the resources are available to load. (i.e. no reboot required)
|
|
175
|
+
* @param name Unique name of the mount
|
|
176
|
+
* @param uri The uri of the mount, including the scheme. Currently supported schemes are 'zip' and 'archive'.
|
|
177
|
+
* @param priority Priority of mount. Larger priority takes prescedence
|
|
178
|
+
* @param callback Callback after the asynchronous request completed
|
|
179
|
+
* @return result The result of the request
|
|
180
|
+
*/
|
|
181
|
+
export function add_mount(name: string, uri: string, priority: any, callback: any): number
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Return a reference to the Manifest that is currently loaded.
|
|
185
|
+
* @return manifest_reference reference to the Manifest that is currently loaded
|
|
186
|
+
*/
|
|
187
|
+
export function get_current_manifest(): number
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Get an array of the current mounts
|
|
191
|
+
* This can be used to determine if a new mount is needed or not
|
|
192
|
+
* @return mounts Array of mounts
|
|
193
|
+
*/
|
|
194
|
+
export function get_mounts(): any
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Is any liveupdate data mounted and currently in use?
|
|
198
|
+
* This can be used to determine if a new manifest or zip file should be downloaded.
|
|
199
|
+
* @return bool true if a liveupdate archive (any format) has been loaded
|
|
200
|
+
*/
|
|
201
|
+
export function is_using_liveupdate_data(): any
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Remove a mount the resource system.
|
|
205
|
+
* The remaining mounts are persisted between sessions.
|
|
206
|
+
* Removing a mount does not affect any loaded resources.
|
|
207
|
+
* @param name Unique name of the mount
|
|
208
|
+
* @return result The result of the call
|
|
209
|
+
*/
|
|
210
|
+
export function remove_mount(name: string): number
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Stores a zip file and uses it for live update content. The contents of the
|
|
214
|
+
* zip file will be verified against the manifest to ensure file integrity.
|
|
215
|
+
* It is possible to opt out of the resource verification using an option passed
|
|
216
|
+
* to this function.
|
|
217
|
+
* The path is stored in the (internal) live update location.
|
|
218
|
+
* @param path the path to the original file on disc
|
|
219
|
+
* @param callback the callback function
|
|
220
|
+
executed after the storage has completed
|
|
221
|
+
|
|
222
|
+
`self`
|
|
223
|
+
The current object.
|
|
224
|
+
`status`
|
|
225
|
+
the status of the store operation (See liveupdate.store_manifest)
|
|
226
|
+
|
|
227
|
+
* @param options optional table with extra parameters. Supported entries:
|
|
228
|
+
|
|
229
|
+
`verify`: if archive should be verified as well as stored (defaults to true)
|
|
230
|
+
|
|
231
|
+
*/
|
|
232
|
+
export function store_archive(path: string, callback: any, options?: any): void
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Create a new manifest from a buffer. The created manifest is verified
|
|
236
|
+
* by ensuring that the manifest was signed using the bundled public/private
|
|
237
|
+
* key-pair during the bundle process and that the manifest supports the current
|
|
238
|
+
* running engine version. Once the manifest is verified it is stored on device.
|
|
239
|
+
* The next time the engine starts (or is rebooted) it will look for the stored
|
|
240
|
+
* manifest before loading resources. Storing a new manifest allows the
|
|
241
|
+
* developer to update the game, modify existing resources, or add new
|
|
242
|
+
* resources to the game through LiveUpdate.
|
|
243
|
+
* @param manifest_buffer the binary data that represents the manifest
|
|
244
|
+
* @param callback the callback function
|
|
245
|
+
executed once the engine has attempted to store the manifest.
|
|
246
|
+
|
|
247
|
+
`self`
|
|
248
|
+
The current object.
|
|
249
|
+
`status`
|
|
250
|
+
the status of the store operation:
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
- `liveupdate.LIVEUPDATE_OK`
|
|
254
|
+
- `liveupdate.LIVEUPDATE_INVALID_RESOURCE`
|
|
255
|
+
- `liveupdate.LIVEUPDATE_VERSION_MISMATCH`
|
|
256
|
+
- `liveupdate.LIVEUPDATE_ENGINE_VERSION_MISMATCH`
|
|
257
|
+
- `liveupdate.LIVEUPDATE_SIGNATURE_MISMATCH`
|
|
258
|
+
- `liveupdate.LIVEUPDATE_BUNDLED_RESOURCE_MISMATCH`
|
|
259
|
+
- `liveupdate.LIVEUPDATE_FORMAT_ERROR`
|
|
260
|
+
|
|
261
|
+
*/
|
|
262
|
+
export function store_manifest(manifest_buffer: string, callback: any): void
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* add a resource to the data archive and runtime index. The resource will be verified
|
|
266
|
+
* internally before being added to the data archive.
|
|
267
|
+
* @param manifest_reference The manifest to check against.
|
|
268
|
+
* @param data The resource data that should be stored.
|
|
269
|
+
* @param hexdigest The expected hash for the resource,
|
|
270
|
+
retrieved through collectionproxy.missing_resources.
|
|
271
|
+
* @param callback The callback
|
|
272
|
+
function that is executed once the engine has been attempted to store
|
|
273
|
+
the resource.
|
|
274
|
+
|
|
275
|
+
`self`
|
|
276
|
+
The current object.
|
|
277
|
+
`hexdigest`
|
|
278
|
+
The hexdigest of the resource.
|
|
279
|
+
`status`
|
|
280
|
+
Whether or not the resource was successfully stored.
|
|
281
|
+
|
|
282
|
+
*/
|
|
283
|
+
export function store_resource(manifest_reference: number, data: string, hexdigest: string, callback: any): void
|
|
284
|
+
|
|
285
|
+
}
|
|
286
|
+
// =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
|
|
287
|
+
|
|
288
|
+
|
|
104
289
|
declare namespace socket {
|
|
105
290
|
|
|
106
291
|
/**
|
|
@@ -3935,6 +4120,7 @@ end
|
|
|
3935
4120
|
* do not intersect with ray casts.
|
|
3936
4121
|
* Which collision objects to hit is filtered by their collision groups and can be configured
|
|
3937
4122
|
* through `groups`.
|
|
4123
|
+
* NOTE: Ray casts will ignore collision objects that contain the starting point of the ray. This is a limitation in Box2D.
|
|
3938
4124
|
* @param from the world position of the start of the ray
|
|
3939
4125
|
* @param to the world position of the end of the ray
|
|
3940
4126
|
* @param groups a lua table containing the hashed groups for which to test collisions against
|
|
@@ -3958,6 +4144,7 @@ Set to `true` to return all ray cast hits. If `false`, it will only return the c
|
|
|
3958
4144
|
* - If an object is hit, the result will be reported via a ray_cast_response message.
|
|
3959
4145
|
* - If there is no object hit, the result will be reported via a ray_cast_missed message.
|
|
3960
4146
|
*
|
|
4147
|
+
* NOTE: Ray casts will ignore collision objects that contain the starting point of the ray. This is a limitation in Box2D.
|
|
3961
4148
|
* @param from the world position of the start of the ray
|
|
3962
4149
|
* @param to the world position of the end of the ray
|
|
3963
4150
|
* @param groups a lua table containing the hashed groups for which to test collisions against
|
|
@@ -5180,6 +5367,23 @@ optional flag to determine wether or not the resource should take over ownership
|
|
|
5180
5367
|
*/
|
|
5181
5368
|
export function create_buffer(path: string, table?: any): hash
|
|
5182
5369
|
|
|
5370
|
+
/**
|
|
5371
|
+
* Creates a sound data resource
|
|
5372
|
+
* Supported formats are .oggc and .wavc
|
|
5373
|
+
* @param path the path to the resource. Must not already exist.
|
|
5374
|
+
* @param options A table containing parameters for the text. Supported entries:
|
|
5375
|
+
|
|
5376
|
+
`data`
|
|
5377
|
+
The raw data of the file. May be partial, but must include the header of the file
|
|
5378
|
+
`filesize`
|
|
5379
|
+
If the file is partial, it must also specify the full size of the complete file.
|
|
5380
|
+
`partial`
|
|
5381
|
+
Is the data not representing the full file, but just the initial chunk?
|
|
5382
|
+
|
|
5383
|
+
* @return path_hash the resulting path hash to the resource
|
|
5384
|
+
*/
|
|
5385
|
+
export function create_sound_data(path: string, options?: any): hash
|
|
5386
|
+
|
|
5183
5387
|
/**
|
|
5184
5388
|
* Creates a new texture resource that can be used in the same way as any texture created during build time.
|
|
5185
5389
|
* The path used for creating the texture must be unique, trying to create a resource at a path that is already
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-defold/types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.60",
|
|
4
4
|
"description": "TypeScript definitions for Defold",
|
|
5
5
|
"repository": "github:ts-defold/types",
|
|
6
6
|
"keywords": [
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"lua-types": "^2.10.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@ts-defold/type-gen": "^0.5.
|
|
31
|
-
"typescript": "
|
|
32
|
-
"typescript-to-lua": "~1.
|
|
30
|
+
"@ts-defold/type-gen": "^0.5.7",
|
|
31
|
+
"typescript": "5.7.2",
|
|
32
|
+
"typescript-to-lua": "~1.29.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"typescript-to-lua": "^1.10.0"
|