@defold-typescript/types 0.39.0 → 0.41.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.
- package/api-availability.json +4024 -716
- package/api-migrations.json +27 -0
- package/api-signatures.json +18118 -10264
- package/api-targets.json +448 -11
- package/examples/translations.json +619 -148
- package/fixtures/messages_doc.json +96 -0
- package/generated/b2d.d.ts +680 -4
- package/generated/b2d_body.d.ts +29 -103
- package/generated/b2d_chain.d.ts +5 -6
- package/generated/b2d_fixture.d.ts +34 -38
- package/generated/b2d_joint.d.ts +503 -25
- package/generated/b2d_shape.d.ts +199 -14
- package/generated/b2d_world.d.ts +57 -63
- package/generated/buffer.d.ts +33 -29
- package/generated/builtin-messages.d.ts +7 -1
- package/generated/bullet3d.d.ts +91 -0
- package/generated/bullet3d_collision_object.d.ts +433 -0
- package/generated/bullet3d_constraint.d.ts +818 -0
- package/generated/bullet3d_rigid_body.d.ts +429 -0
- package/generated/bullet3d_shape.d.ts +123 -0
- package/generated/bullet3d_world.d.ts +492 -0
- package/generated/camera.d.ts +31 -34
- package/generated/collectionfactory.d.ts +26 -27
- package/generated/collectionproxy.d.ts +22 -6
- package/generated/compute.d.ts +12 -238
- package/generated/crash.d.ts +24 -10
- package/generated/editor-vm/http.d.ts +90 -7
- package/generated/editor-vm/image.d.ts +7 -7
- package/generated/editor-vm/json.d.ts +11 -0
- package/generated/editor-vm/localization.d.ts +7 -7
- package/generated/editor-vm/tilemap_tiles.d.ts +56 -10
- package/generated/editor-vm/zip.d.ts +28 -0
- package/generated/editor.d.ts +1496 -430
- package/generated/factory.d.ts +21 -25
- package/generated/font.d.ts +64 -22
- package/generated/go.d.ts +243 -186
- package/generated/graphics.d.ts +374 -84
- package/generated/gui.d.ts +282 -492
- package/generated/html5.d.ts +5 -3
- package/generated/http.d.ts +31 -36
- package/generated/image.d.ts +127 -85
- package/generated/json.d.ts +34 -16
- package/generated/kinds/gui-script.d.ts +8 -0
- package/generated/kinds/render-script.d.ts +8 -0
- package/generated/kinds/script.d.ts +8 -0
- package/generated/label.d.ts +77 -7
- package/generated/liveupdate.d.ts +13 -10
- package/generated/material.d.ts +312 -360
- package/generated/model.d.ts +72 -42
- package/generated/particlefx.d.ts +19 -28
- package/generated/physics.d.ts +378 -144
- package/generated/profiler.d.ts +14 -24
- package/generated/render.d.ts +294 -297
- package/generated/resource.d.ts +753 -641
- package/generated/socket.d.ts +131 -134
- package/generated/sound.d.ts +65 -34
- package/generated/sprite.d.ts +39 -17
- package/generated/sys.d.ts +237 -182
- package/generated/tilemap.d.ts +21 -16
- package/generated/timer.d.ts +34 -21
- package/generated/versions/defold-1.12.4/b2d_body.d.ts +0 -7
- package/generated/versions/defold-1.12.4/buffer.d.ts +18 -17
- package/generated/versions/defold-1.12.4/camera.d.ts +23 -23
- package/generated/versions/defold-1.12.4/collectionfactory.d.ts +21 -19
- package/generated/versions/defold-1.12.4/collectionproxy.d.ts +2 -2
- package/generated/versions/defold-1.12.4/crash.d.ts +2 -2
- package/generated/versions/defold-1.12.4/factory.d.ts +15 -16
- package/generated/versions/defold-1.12.4/go.d.ts +15 -17
- package/generated/versions/defold-1.12.4/gui.d.ts +111 -193
- package/generated/versions/defold-1.12.4/html5.d.ts +4 -2
- package/generated/versions/defold-1.12.4/http.d.ts +4 -15
- package/generated/versions/defold-1.12.4/image.d.ts +38 -46
- package/generated/versions/defold-1.12.4/index.d.ts +2 -0
- package/generated/versions/defold-1.12.4/json.d.ts +10 -6
- package/generated/versions/defold-1.12.4/label.d.ts +2 -3
- package/generated/versions/defold-1.12.4/liveupdate.d.ts +5 -3
- package/generated/versions/defold-1.12.4/model.d.ts +34 -13
- package/generated/versions/defold-1.12.4/particlefx.d.ts +2 -5
- package/generated/versions/defold-1.12.4/physics.d.ts +82 -78
- package/generated/versions/defold-1.12.4/profiler.d.ts +3 -6
- package/generated/versions/defold-1.12.4/render.d.ts +160 -132
- package/generated/versions/defold-1.12.4/resource.d.ts +212 -209
- package/generated/versions/defold-1.12.4/socket.d.ts +45 -61
- package/generated/versions/defold-1.12.4/sound.d.ts +11 -11
- package/generated/versions/defold-1.12.4/sprite.d.ts +24 -6
- package/generated/versions/defold-1.12.4/sys.d.ts +45 -68
- package/generated/versions/defold-1.12.4/tilemap.d.ts +18 -11
- package/generated/versions/defold-1.12.4/timer.d.ts +5 -3
- package/generated/versions/defold-1.12.4/vmath.d.ts +5 -26
- package/generated/versions/defold-1.12.4/window.d.ts +1 -16
- package/generated/versions/defold-1.13.0/b2d_body.d.ts +10 -55
- package/generated/versions/defold-1.13.0/b2d_fixture.d.ts +25 -25
- package/generated/versions/defold-1.13.0/b2d_shape.d.ts +188 -5
- package/generated/versions/defold-1.13.0/b2d_world.d.ts +16 -10
- package/generated/versions/defold-1.13.0/buffer.d.ts +18 -17
- package/generated/versions/defold-1.13.0/camera.d.ts +27 -27
- package/generated/versions/defold-1.13.0/collectionfactory.d.ts +21 -19
- package/generated/versions/defold-1.13.0/collectionproxy.d.ts +2 -2
- package/generated/versions/defold-1.13.0/compute.d.ts +1 -70
- package/generated/versions/defold-1.13.0/crash.d.ts +2 -2
- package/generated/versions/defold-1.13.0/editor-vm/tilemap_tiles.d.ts +3 -3
- package/generated/versions/defold-1.13.0/editor.d.ts +34 -24
- package/generated/versions/defold-1.13.0/factory.d.ts +15 -16
- package/generated/versions/defold-1.13.0/go.d.ts +15 -17
- package/generated/versions/defold-1.13.0/graphics.d.ts +121 -37
- package/generated/versions/defold-1.13.0/gui.d.ts +111 -193
- package/generated/versions/defold-1.13.0/html5.d.ts +4 -2
- package/generated/versions/defold-1.13.0/http.d.ts +4 -15
- package/generated/versions/defold-1.13.0/image.d.ts +38 -46
- package/generated/versions/defold-1.13.0/index.d.ts +2 -0
- package/generated/versions/defold-1.13.0/json.d.ts +10 -6
- package/generated/versions/defold-1.13.0/label.d.ts +2 -3
- package/generated/versions/defold-1.13.0/liveupdate.d.ts +7 -5
- package/generated/versions/defold-1.13.0/material.d.ts +69 -107
- package/generated/versions/defold-1.13.0/model.d.ts +34 -13
- package/generated/versions/defold-1.13.0/particlefx.d.ts +2 -5
- package/generated/versions/defold-1.13.0/physics.d.ts +82 -78
- package/generated/versions/defold-1.13.0/profiler.d.ts +3 -6
- package/generated/versions/defold-1.13.0/render.d.ts +160 -132
- package/generated/versions/defold-1.13.0/resource.d.ts +217 -210
- package/generated/versions/defold-1.13.0/socket.d.ts +45 -61
- package/generated/versions/defold-1.13.0/sound.d.ts +11 -11
- package/generated/versions/defold-1.13.0/sprite.d.ts +24 -6
- package/generated/versions/defold-1.13.0/sys.d.ts +45 -68
- package/generated/versions/defold-1.13.0/tilemap.d.ts +18 -11
- package/generated/versions/defold-1.13.0/timer.d.ts +5 -3
- package/generated/versions/defold-1.13.0/vmath.d.ts +5 -26
- package/generated/versions/defold-1.13.0/window.d.ts +1 -16
- package/generated/versions/defold-1.13.1/b2d.d.ts +33 -0
- package/generated/versions/defold-1.13.1/b2d_body.d.ts +636 -0
- package/generated/versions/defold-1.13.1/b2d_chain.d.ts +106 -0
- package/generated/versions/defold-1.13.1/b2d_fixture.d.ts +157 -0
- package/generated/versions/defold-1.13.1/b2d_joint.d.ts +823 -0
- package/generated/versions/defold-1.13.1/b2d_shape.d.ts +400 -0
- package/generated/versions/defold-1.13.1/b2d_world.d.ts +320 -0
- package/generated/versions/defold-1.13.1/buffer.d.ts +189 -0
- package/generated/versions/defold-1.13.1/camera.d.ts +303 -0
- package/generated/versions/defold-1.13.1/collectionfactory.d.ts +151 -0
- package/generated/versions/defold-1.13.1/collectionproxy.d.ts +93 -0
- package/generated/versions/defold-1.13.1/compute.d.ts +237 -0
- package/generated/versions/defold-1.13.1/crash.d.ts +143 -0
- package/generated/versions/defold-1.13.1/editor-vm/http.d.ts +56 -0
- package/generated/versions/defold-1.13.1/editor-vm/image.d.ts +48 -0
- package/generated/versions/defold-1.13.1/editor-vm/json.d.ts +10 -0
- package/generated/versions/defold-1.13.1/editor-vm/localization.d.ts +42 -0
- package/generated/versions/defold-1.13.1/editor-vm/tilemap_tiles.d.ts +80 -0
- package/generated/versions/defold-1.13.1/editor-vm/zip.d.ts +10 -0
- package/generated/versions/defold-1.13.1/editor-vm/zlib.d.ts +24 -0
- package/generated/versions/defold-1.13.1/editor.d.ts +1121 -0
- package/generated/versions/defold-1.13.1/factory.d.ts +124 -0
- package/generated/versions/defold-1.13.1/font.d.ts +81 -0
- package/generated/versions/defold-1.13.1/go.d.ts +1107 -0
- package/generated/versions/defold-1.13.1/graphics.d.ts +411 -0
- package/generated/versions/defold-1.13.1/gui.d.ts +2353 -0
- package/generated/versions/defold-1.13.1/html5.d.ts +55 -0
- package/generated/versions/defold-1.13.1/http.d.ts +77 -0
- package/generated/versions/defold-1.13.1/image.d.ts +131 -0
- package/generated/versions/defold-1.13.1/index.d.ts +57 -0
- package/generated/versions/defold-1.13.1/json.d.ts +80 -0
- package/generated/versions/defold-1.13.1/kinds/editor-script.d.ts +14 -0
- package/generated/versions/defold-1.13.1/label.d.ts +93 -0
- package/generated/versions/defold-1.13.1/liveupdate.d.ts +142 -0
- package/generated/versions/defold-1.13.1/material.d.ts +408 -0
- package/generated/versions/defold-1.13.1/model.d.ts +272 -0
- package/generated/versions/defold-1.13.1/msg.d.ts +10 -0
- package/generated/versions/defold-1.13.1/particlefx.d.ts +163 -0
- package/generated/versions/defold-1.13.1/physics.d.ts +559 -0
- package/generated/versions/defold-1.13.1/profiler.d.ts +235 -0
- package/generated/versions/defold-1.13.1/render.d.ts +1190 -0
- package/generated/versions/defold-1.13.1/resource.d.ts +1523 -0
- package/generated/versions/defold-1.13.1/socket.d.ts +784 -0
- package/generated/versions/defold-1.13.1/sound.d.ts +292 -0
- package/generated/versions/defold-1.13.1/sprite.d.ts +175 -0
- package/generated/versions/defold-1.13.1/sys.d.ts +678 -0
- package/generated/versions/defold-1.13.1/tilemap.d.ts +208 -0
- package/generated/versions/defold-1.13.1/timer.d.ts +125 -0
- package/generated/versions/defold-1.13.1/types.d.ts +61 -0
- package/generated/versions/defold-1.13.1/vmath.d.ts +774 -0
- package/generated/versions/defold-1.13.1/window.d.ts +183 -0
- package/generated/versions/defold-1.13.1/zlib.d.ts +41 -0
- package/generated/vmath.d.ts +6 -26
- package/generated/window.d.ts +71 -71
- package/identity-vocabulary.json +561 -0
- package/index.d.ts +8 -0
- package/package.json +13 -2
- package/scripts/example-store-io.ts +12 -1
- package/scripts/extension-goldens.ts +1 -0
- package/scripts/fidelity-baseline.json +146 -46
- package/scripts/generate-api-availability.ts +90 -12
- package/scripts/generate-api-signatures.ts +14 -3
- package/scripts/import-defold-release.ts +85 -24
- package/scripts/prose-constants.ts +157 -0
- package/scripts/regen.ts +396 -78
- package/scripts/shared-handle-methods.ts +53 -0
- package/scripts/signature-store-fs.ts +1 -0
- package/scripts/sync-api-docs.ts +16 -5
- package/src/api-availability.ts +0 -0
- package/src/api-doc.ts +201 -3
- package/src/api-identity.ts +252 -0
- package/src/component-properties.d.ts +33 -0
- package/src/core-types.ts +28 -3
- package/src/correction-pins.ts +49 -0
- package/src/custom-messages.d.ts +4 -3
- package/src/doc-comment.ts +139 -23
- package/src/doc-corrections.ts +108 -0
- package/src/editor-vm-globals.d.ts +5 -2
- package/src/emit-dts.ts +2474 -281
- package/src/emit-messages.ts +52 -0
- package/src/engine-globals.d.ts +2 -2
- package/src/example-store.ts +125 -14
- package/src/field-correction-coverage.ts +204 -0
- package/src/fnv1a.ts +16 -0
- package/src/go-overloads.d.ts +33 -13
- package/src/index-base-table.ts +145 -0
- package/src/index-slot-classifications.ts +588 -0
- package/src/index.ts +39 -2
- package/src/library-index-slot-classifications.ts +332 -0
- package/src/lifecycle.ts +61 -199
- package/src/luals-type-expr.ts +354 -0
- package/src/msg-overloads.d.ts +0 -1
- package/src/param-correction-provenance.ts +64 -0
- package/src/return-correction-provenance.ts +58 -16
- package/src/script-api.ts +3 -1
- package/src/sys-overloads.d.ts +48 -0
- package/src/vmath-overloads.d.ts +27 -1
- package/src/window-event-guard.d.ts +6 -9
- package/url-parameters.json +1 -2
package/generated/compute.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
|
-
import type { Hash
|
|
2
|
+
import type { Hash } from "../src/core-types";
|
|
3
3
|
|
|
4
4
|
declare global {
|
|
5
5
|
/**
|
|
@@ -10,285 +10,59 @@ declare global {
|
|
|
10
10
|
* Returns a table of all the shader constants in the compute program.
|
|
11
11
|
*
|
|
12
12
|
* @param path - The path to the resource
|
|
13
|
-
* @returns
|
|
14
|
-
*
|
|
15
|
-
* `name`
|
|
16
|
-
* hash the hashed name of the constant
|
|
17
|
-
* `type`
|
|
18
|
-
* number the type of the constant. Supported values:
|
|
19
|
-
*
|
|
20
|
-
* - `material.CONSTANT_TYPE_USER`
|
|
21
|
-
*
|
|
22
|
-
* - `material.CONSTANT_TYPE_USER_MATRIX4`
|
|
23
|
-
*
|
|
24
|
-
* - `material.CONSTANT_TYPE_VIEWPROJ`
|
|
25
|
-
*
|
|
26
|
-
* - `material.CONSTANT_TYPE_WORLD`
|
|
27
|
-
*
|
|
28
|
-
* - `material.CONSTANT_TYPE_TEXTURE`
|
|
29
|
-
*
|
|
30
|
-
* - `material.CONSTANT_TYPE_VIEW`
|
|
31
|
-
*
|
|
32
|
-
* - `material.CONSTANT_TYPE_PROJECTION`
|
|
33
|
-
*
|
|
34
|
-
* - `material.CONSTANT_TYPE_NORMAL`
|
|
35
|
-
*
|
|
36
|
-
* - `material.CONSTANT_TYPE_WORLDVIEW`
|
|
37
|
-
*
|
|
38
|
-
* - `material.CONSTANT_TYPE_WORLDVIEWPROJ`
|
|
39
|
-
*
|
|
40
|
-
* - `material.CONSTANT_TYPE_TIME`
|
|
41
|
-
*
|
|
42
|
-
* - `material.CONSTANT_TYPE_WORLD_INVERSE`
|
|
43
|
-
*
|
|
44
|
-
* - `material.CONSTANT_TYPE_VIEW_INVERSE`
|
|
45
|
-
*
|
|
46
|
-
* - `material.CONSTANT_TYPE_PROJECTION_INVERSE`
|
|
47
|
-
*
|
|
48
|
-
* - `material.CONSTANT_TYPE_VIEWPROJ_INVERSE`
|
|
49
|
-
*
|
|
50
|
-
* - `material.CONSTANT_TYPE_WORLDVIEW_INVERSE`
|
|
51
|
-
*
|
|
52
|
-
* - `material.CONSTANT_TYPE_WORLDVIEWPROJ_INVERSE`
|
|
53
|
-
*
|
|
54
|
-
* `value`
|
|
55
|
-
* vmath.vector4 | vmath.matrix4 the value(s) of the constant. If the constant is an array, the value will be a table of vmath.vector4 or vmath.matrix4 if the type is `material.CONSTANT_TYPE_USER_MATRIX4`.
|
|
13
|
+
* @returns Information about the shader constants.
|
|
56
14
|
* @example
|
|
57
15
|
* ```ts
|
|
58
16
|
* const constants = compute.get_constants("/my_compute.computec");
|
|
59
17
|
* ```
|
|
60
18
|
*/
|
|
61
|
-
function get_constants(path: Hash | string):
|
|
19
|
+
function get_constants(path: Hash | string): material.constant_info[];
|
|
62
20
|
/**
|
|
63
21
|
* Returns a table of all the texture samplers in the compute program. This function will return all the texture samplers
|
|
64
22
|
* that are available, even the ones that have not been specified in the compute resource.
|
|
65
23
|
*
|
|
66
24
|
* @param path - The path to the resource
|
|
67
|
-
* @returns
|
|
68
|
-
*
|
|
69
|
-
* `name`
|
|
70
|
-
* hash the hashed name of the texture sampler
|
|
71
|
-
* `u_wrap`
|
|
72
|
-
* number the u wrap mode of the texture sampler. Supported values:
|
|
73
|
-
*
|
|
74
|
-
* - `graphics.TEXTURE_WRAP_CLAMP_TO_BORDER`
|
|
75
|
-
*
|
|
76
|
-
* - `graphics.TEXTURE_WRAP_CLAMP_TO_EDGE`
|
|
77
|
-
*
|
|
78
|
-
* - `graphics.TEXTURE_WRAP_MIRRORED_REPEAT`
|
|
79
|
-
*
|
|
80
|
-
* - `graphics.TEXTURE_WRAP_REPEAT`
|
|
81
|
-
*
|
|
82
|
-
* `v_wrap`
|
|
83
|
-
* number the v wrap mode of the texture sampler. Supported values:
|
|
84
|
-
*
|
|
85
|
-
* - `graphics.TEXTURE_WRAP_CLAMP_TO_BORDER`
|
|
86
|
-
*
|
|
87
|
-
* - `graphics.TEXTURE_WRAP_CLAMP_TO_EDGE`
|
|
88
|
-
*
|
|
89
|
-
* - `graphics.TEXTURE_WRAP_MIRRORED_REPEAT`
|
|
90
|
-
*
|
|
91
|
-
* - `graphics.TEXTURE_WRAP_REPEAT`
|
|
92
|
-
*
|
|
93
|
-
* `min_filter`
|
|
94
|
-
* number the min filter mode of the texture sampler. Supported values:
|
|
95
|
-
*
|
|
96
|
-
* - `graphics.TEXTURE_FILTER_DEFAULT`
|
|
97
|
-
*
|
|
98
|
-
* - `graphics.TEXTURE_FILTER_NEAREST`
|
|
99
|
-
*
|
|
100
|
-
* - `graphics.TEXTURE_FILTER_LINEAR`
|
|
101
|
-
*
|
|
102
|
-
* - `graphics.TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST`
|
|
103
|
-
*
|
|
104
|
-
* - `graphics.TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR`
|
|
105
|
-
*
|
|
106
|
-
* - `graphics.TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST`
|
|
107
|
-
*
|
|
108
|
-
* - `graphics.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR`
|
|
109
|
-
*
|
|
110
|
-
* `mag_filter`
|
|
111
|
-
* number the mag filter mode of the texture sampler
|
|
112
|
-
*
|
|
113
|
-
* - `graphics.TEXTURE_FILTER_DEFAULT`
|
|
114
|
-
*
|
|
115
|
-
* - `graphics.TEXTURE_FILTER_NEAREST`
|
|
116
|
-
*
|
|
117
|
-
* - `graphics.TEXTURE_FILTER_LINEAR`
|
|
118
|
-
*
|
|
119
|
-
* `max_anisotropy`
|
|
120
|
-
* number the max anisotropy of the texture sampler
|
|
25
|
+
* @returns Information about the texture samplers.
|
|
121
26
|
* @example
|
|
122
27
|
* ```ts
|
|
123
28
|
* const samplers = compute.get_samplers("/my_compute.computec");
|
|
124
29
|
* ```
|
|
125
30
|
*/
|
|
126
|
-
function get_samplers(path: Hash | string):
|
|
31
|
+
function get_samplers(path: Hash | string): material.sampler_info[];
|
|
127
32
|
/**
|
|
128
33
|
* Returns a table of all the textures from the compute program.
|
|
129
34
|
*
|
|
130
35
|
* @param path - The path to the resource
|
|
131
|
-
* @returns
|
|
132
|
-
*
|
|
133
|
-
* `path`
|
|
134
|
-
* hash the resource path of the texture. Only available if the texture is a resource.
|
|
135
|
-
* `handle`
|
|
136
|
-
* hash the runtime handle of the texture.
|
|
137
|
-
* `width`
|
|
138
|
-
* number the width of the texture
|
|
139
|
-
* `height`
|
|
140
|
-
* number the height of the texture
|
|
141
|
-
* `depth`
|
|
142
|
-
* number the depth of the texture. Corresponds to the number of layers in an array texture.
|
|
143
|
-
* `mipmaps`
|
|
144
|
-
* number the number of mipmaps in the texture
|
|
145
|
-
* `type`
|
|
146
|
-
* number the type of the texture. Supported values:
|
|
147
|
-
*
|
|
148
|
-
* - `graphics.TEXTURE_TYPE_2D`
|
|
149
|
-
*
|
|
150
|
-
* - `graphics.TEXTURE_TYPE_2D_ARRAY`
|
|
151
|
-
*
|
|
152
|
-
* - `graphics.TEXTURE_TYPE_CUBE_MAP`
|
|
153
|
-
*
|
|
154
|
-
* - `graphics.TEXTURE_TYPE_IMAGE_2D`
|
|
155
|
-
*
|
|
156
|
-
* - `graphics.TEXTURE_TYPE_3D`
|
|
157
|
-
*
|
|
158
|
-
* - `graphics.TEXTURE_TYPE_IMAGE_3D`
|
|
159
|
-
*
|
|
160
|
-
* `flags`
|
|
161
|
-
* number the flags of the texture. This field is a bit mask of these supported flags:
|
|
162
|
-
*
|
|
163
|
-
* - `graphics.TEXTURE_USAGE_FLAG_SAMPLE`
|
|
164
|
-
*
|
|
165
|
-
* - `graphics.TEXTURE_USAGE_FLAG_MEMORYLESS`
|
|
166
|
-
*
|
|
167
|
-
* - `graphics.TEXTURE_USAGE_FLAG_STORAGE`
|
|
168
|
-
*
|
|
169
|
-
* - `graphics.TEXTURE_USAGE_FLAG_INPUT`
|
|
170
|
-
*
|
|
171
|
-
* - `graphics.TEXTURE_USAGE_FLAG_COLOR`
|
|
36
|
+
* @returns Information about the compute textures.
|
|
172
37
|
* @example
|
|
173
38
|
* ```ts
|
|
174
39
|
* const textures = compute.get_textures("/my_compute.computec");
|
|
175
40
|
* ```
|
|
176
41
|
*/
|
|
177
|
-
function get_textures(path: Hash | string):
|
|
42
|
+
function get_textures(path: Hash | string): material.texture_info[];
|
|
178
43
|
/**
|
|
179
44
|
* Sets shader constants in a compute program, if the constants exist.
|
|
180
45
|
*
|
|
181
46
|
* @param path - The path to the resource
|
|
182
|
-
* @param constants -
|
|
183
|
-
*
|
|
184
|
-
* `type`
|
|
185
|
-
* number the type of the constant. Supported values:
|
|
186
|
-
*
|
|
187
|
-
* - `material.CONSTANT_TYPE_USER`
|
|
188
|
-
*
|
|
189
|
-
* - `material.CONSTANT_TYPE_USER_MATRIX4`
|
|
190
|
-
*
|
|
191
|
-
* - `material.CONSTANT_TYPE_VIEWPROJ`
|
|
192
|
-
*
|
|
193
|
-
* - `material.CONSTANT_TYPE_WORLD`
|
|
194
|
-
*
|
|
195
|
-
* - `material.CONSTANT_TYPE_TEXTURE`
|
|
196
|
-
*
|
|
197
|
-
* - `material.CONSTANT_TYPE_VIEW`
|
|
198
|
-
*
|
|
199
|
-
* - `material.CONSTANT_TYPE_PROJECTION`
|
|
200
|
-
*
|
|
201
|
-
* - `material.CONSTANT_TYPE_NORMAL`
|
|
202
|
-
*
|
|
203
|
-
* - `material.CONSTANT_TYPE_WORLDVIEW`
|
|
204
|
-
*
|
|
205
|
-
* - `material.CONSTANT_TYPE_WORLDVIEWPROJ`
|
|
206
|
-
*
|
|
207
|
-
* - `material.CONSTANT_TYPE_TIME`
|
|
208
|
-
*
|
|
209
|
-
* - `material.CONSTANT_TYPE_WORLD_INVERSE`
|
|
210
|
-
*
|
|
211
|
-
* - `material.CONSTANT_TYPE_VIEW_INVERSE`
|
|
212
|
-
*
|
|
213
|
-
* - `material.CONSTANT_TYPE_PROJECTION_INVERSE`
|
|
214
|
-
*
|
|
215
|
-
* - `material.CONSTANT_TYPE_VIEWPROJ_INVERSE`
|
|
216
|
-
*
|
|
217
|
-
* - `material.CONSTANT_TYPE_WORLDVIEW_INVERSE`
|
|
218
|
-
*
|
|
219
|
-
* - `material.CONSTANT_TYPE_WORLDVIEWPROJ_INVERSE`
|
|
220
|
-
*
|
|
221
|
-
* `value`
|
|
222
|
-
* vmath.vector4 | vmath.vector3 | vmath.matrix4 | number | table the value(s) of the constant. If the shader constant is an array, the amount of values to update depends on how many values that are passed in the 'value' field.
|
|
47
|
+
* @param constants - Constant options keyed by constant name. Partial updates are supported.
|
|
223
48
|
* @example
|
|
224
49
|
* ```ts
|
|
225
50
|
* compute.set_constants("/my_compute.computec", { tint: { value: vmath.vector4(1, 0, 0, 1) } });
|
|
226
51
|
* ```
|
|
227
52
|
*/
|
|
228
|
-
function set_constants(path: Hash | string, constants:
|
|
53
|
+
function set_constants(path: Hash | string, constants: LuaMap<string | Hash, material.constant_options> | Record<string, material.constant_options>): void;
|
|
229
54
|
/**
|
|
230
55
|
* Sets texture samplers in a compute program, if the samplers exist. Use this function to change the settings of texture samplers.
|
|
231
56
|
* To set actual textures that should be bound to the samplers, use the `compute.set_textures` function instead.
|
|
232
57
|
*
|
|
233
58
|
* @param path - The path to the resource
|
|
234
|
-
* @param samplers -
|
|
235
|
-
*
|
|
236
|
-
* `u_wrap`
|
|
237
|
-
* number the u wrap mode of the texture sampler. Supported values:
|
|
238
|
-
*
|
|
239
|
-
* - `graphics.TEXTURE_WRAP_CLAMP_TO_BORDER`
|
|
240
|
-
*
|
|
241
|
-
* - `graphics.TEXTURE_WRAP_CLAMP_TO_EDGE`
|
|
242
|
-
*
|
|
243
|
-
* - `graphics.TEXTURE_WRAP_MIRRORED_REPEAT`
|
|
244
|
-
*
|
|
245
|
-
* - `graphics.TEXTURE_WRAP_REPEAT`
|
|
246
|
-
*
|
|
247
|
-
* `v_wrap`
|
|
248
|
-
* number the v wrap mode of the texture sampler. Supported values:
|
|
249
|
-
*
|
|
250
|
-
* - `graphics.TEXTURE_WRAP_CLAMP_TO_BORDER`
|
|
251
|
-
*
|
|
252
|
-
* - `graphics.TEXTURE_WRAP_CLAMP_TO_EDGE`
|
|
253
|
-
*
|
|
254
|
-
* - `graphics.TEXTURE_WRAP_MIRRORED_REPEAT`
|
|
255
|
-
*
|
|
256
|
-
* - `graphics.TEXTURE_WRAP_REPEAT`
|
|
257
|
-
*
|
|
258
|
-
* `min_filter`
|
|
259
|
-
* number the min filter mode of the texture sampler. Supported values:
|
|
260
|
-
*
|
|
261
|
-
* - `graphics.TEXTURE_FILTER_DEFAULT`
|
|
262
|
-
*
|
|
263
|
-
* - `graphics.TEXTURE_FILTER_NEAREST`
|
|
264
|
-
*
|
|
265
|
-
* - `graphics.TEXTURE_FILTER_LINEAR`
|
|
266
|
-
*
|
|
267
|
-
* - `graphics.TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST`
|
|
268
|
-
*
|
|
269
|
-
* - `graphics.TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR`
|
|
270
|
-
*
|
|
271
|
-
* - `graphics.TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST`
|
|
272
|
-
*
|
|
273
|
-
* - `graphics.TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR`
|
|
274
|
-
*
|
|
275
|
-
* `mag_filter`
|
|
276
|
-
* number the mag filter mode of the texture sampler
|
|
277
|
-
*
|
|
278
|
-
* - `graphics.TEXTURE_FILTER_DEFAULT`
|
|
279
|
-
*
|
|
280
|
-
* - `graphics.TEXTURE_FILTER_NEAREST`
|
|
281
|
-
*
|
|
282
|
-
* - `graphics.TEXTURE_FILTER_LINEAR`
|
|
283
|
-
*
|
|
284
|
-
* `max_anisotropy`
|
|
285
|
-
* number the max anisotropy of the texture sampler
|
|
59
|
+
* @param samplers - Sampler options keyed by sampler name. Partial updates are supported.
|
|
286
60
|
* @example
|
|
287
61
|
* ```ts
|
|
288
62
|
* compute.set_samplers("/my_compute.computec", { texture_sampler: { u_wrap: graphics.TEXTURE_WRAP_REPEAT, v_wrap: graphics.TEXTURE_WRAP_MIRRORED_REPEAT } });
|
|
289
63
|
* ```
|
|
290
64
|
*/
|
|
291
|
-
function set_samplers(path: Hash | string, samplers:
|
|
65
|
+
function set_samplers(path: Hash | string, samplers: LuaMap<string | Hash, material.sampler_options> | Record<string, material.sampler_options>): void;
|
|
292
66
|
/**
|
|
293
67
|
* Sets textures in a compute program, if the samplers exist.
|
|
294
68
|
*
|
|
@@ -299,7 +73,7 @@ declare global {
|
|
|
299
73
|
* compute.set_textures("/my_compute.computec", { my_texture: resource.texture() });
|
|
300
74
|
* ```
|
|
301
75
|
*/
|
|
302
|
-
function set_textures(path: Hash | string, textures: LuaMap<string, Hash>): void;
|
|
76
|
+
function set_textures(path: Hash | string, textures: LuaMap<string | Hash, string | Hash> | Record<string, string | Hash>): void;
|
|
303
77
|
}
|
|
304
78
|
}
|
|
305
79
|
|
package/generated/crash.d.ts
CHANGED
|
@@ -4,6 +4,21 @@ declare global {
|
|
|
4
4
|
* Native crash logging functions and constants.
|
|
5
5
|
*/
|
|
6
6
|
namespace crash {
|
|
7
|
+
/**
|
|
8
|
+
* Loaded crash module
|
|
9
|
+
*/
|
|
10
|
+
interface module_info {
|
|
11
|
+
/**
|
|
12
|
+
* module name
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* module load address
|
|
17
|
+
*/
|
|
18
|
+
address: string;
|
|
19
|
+
}
|
|
20
|
+
type USERFIELD = number;
|
|
21
|
+
type SYSFIELD = typeof crash.SYSFIELD_ENGINE_VERSION | typeof crash.SYSFIELD_ENGINE_HASH | typeof crash.SYSFIELD_DEVICE_MODEL | typeof crash.SYSFIELD_MANUFACTURER | typeof crash.SYSFIELD_SYSTEM_NAME | typeof crash.SYSFIELD_SYSTEM_VERSION | typeof crash.SYSFIELD_LANGUAGE | typeof crash.SYSFIELD_DEVICE_LANGUAGE | typeof crash.SYSFIELD_TERRITORY | typeof crash.SYSFIELD_ANDROID_BUILD_FINGERPRINT;
|
|
7
22
|
/**
|
|
8
23
|
* android build fingerprint
|
|
9
24
|
*/
|
|
@@ -62,7 +77,7 @@ declare global {
|
|
|
62
77
|
* @param handle - crash dump handle
|
|
63
78
|
* @returns table containing the backtrace
|
|
64
79
|
*/
|
|
65
|
-
function get_backtrace(handle: number):
|
|
80
|
+
function get_backtrace(handle: number): string[];
|
|
66
81
|
/**
|
|
67
82
|
* The format of read text blob is platform specific
|
|
68
83
|
* and not guaranteed
|
|
@@ -73,13 +88,12 @@ declare global {
|
|
|
73
88
|
*/
|
|
74
89
|
function get_extra_data(handle: number): string;
|
|
75
90
|
/**
|
|
76
|
-
*
|
|
77
|
-
* have fields 'name' and 'address' set for all loaded modules.
|
|
91
|
+
* get all loaded modules from when the crash occured
|
|
78
92
|
*
|
|
79
93
|
* @param handle - crash dump handle
|
|
80
|
-
* @returns
|
|
94
|
+
* @returns loaded modules
|
|
81
95
|
*/
|
|
82
|
-
function get_modules(handle: number):
|
|
96
|
+
function get_modules(handle: number): crash.module_info[];
|
|
83
97
|
/**
|
|
84
98
|
* read signal number from a crash report
|
|
85
99
|
*
|
|
@@ -94,15 +108,15 @@ declare global {
|
|
|
94
108
|
* @param index - system field enum. Must be less than crash.SYSFIELD_MAX
|
|
95
109
|
* @returns value recorded in the crash dump, or `nil` if it didn't exist
|
|
96
110
|
*/
|
|
97
|
-
function get_sys_field(handle: number, index:
|
|
111
|
+
function get_sys_field(handle: number, index: crash.SYSFIELD): string | undefined;
|
|
98
112
|
/**
|
|
99
113
|
* reads user field from a loaded crash dump
|
|
100
114
|
*
|
|
101
115
|
* @param handle - crash dump handle
|
|
102
|
-
* @param index - user data slot index
|
|
116
|
+
* @param index - user data slot index. **0️⃣ 0-based; passed to Defold unchanged.**
|
|
103
117
|
* @returns user data value recorded in the crash dump
|
|
104
118
|
*/
|
|
105
|
-
function get_user_field(handle: number, index:
|
|
119
|
+
function get_user_field(handle: number, index: crash.USERFIELD): string;
|
|
106
120
|
/**
|
|
107
121
|
* The crash dump will be removed from disk upon a successful
|
|
108
122
|
* load, so loading is one-shot.
|
|
@@ -127,10 +141,10 @@ declare global {
|
|
|
127
141
|
* a crash occurs. This can be user id:s, breadcrumb data etc.
|
|
128
142
|
* There are 32 slots indexed from 0. Each slot stores at most 255 characters.
|
|
129
143
|
*
|
|
130
|
-
* @param index - slot index. 0-indexed
|
|
144
|
+
* @param index - slot index. 0-indexed. **0️⃣ 0-based; passed to Defold unchanged.**
|
|
131
145
|
* @param value - string value to store
|
|
132
146
|
*/
|
|
133
|
-
function set_user_field(index:
|
|
147
|
+
function set_user_field(index: crash.USERFIELD, value: string): void;
|
|
134
148
|
/**
|
|
135
149
|
* Performs the same steps as if a crash had just occured but
|
|
136
150
|
* allows the program to continue.
|
|
@@ -1,18 +1,101 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
|
+
import type { Opaque } from "../../src/core-types";
|
|
3
|
+
|
|
2
4
|
declare global {
|
|
3
5
|
/**
|
|
4
6
|
* Editor scripting documentation
|
|
5
7
|
*/
|
|
6
8
|
namespace http {
|
|
9
|
+
type response = Opaque<"http.response">;
|
|
10
|
+
type route = Opaque<"http.route">;
|
|
7
11
|
/**
|
|
8
12
|
* Perform an HTTP request
|
|
9
13
|
*
|
|
10
14
|
* @param url - request URL
|
|
11
|
-
* @param opts -
|
|
12
|
-
* @returns HTTP response
|
|
15
|
+
* @param opts - request options
|
|
16
|
+
* @returns HTTP response
|
|
13
17
|
*/
|
|
14
|
-
function request(url: string, opts?:
|
|
18
|
+
function request(url: string, opts?: http.request.options): http.request.response;
|
|
19
|
+
namespace request {
|
|
20
|
+
type method = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | string;
|
|
21
|
+
/**
|
|
22
|
+
* Options for http.request
|
|
23
|
+
*/
|
|
24
|
+
interface options {
|
|
25
|
+
/**
|
|
26
|
+
* request method, defaults to `"GET"`
|
|
27
|
+
*/
|
|
28
|
+
method?: http.request.method;
|
|
29
|
+
/**
|
|
30
|
+
* request headers
|
|
31
|
+
*/
|
|
32
|
+
headers?: LuaTable<string, string>;
|
|
33
|
+
/**
|
|
34
|
+
* request body
|
|
35
|
+
*/
|
|
36
|
+
body?: string;
|
|
37
|
+
/**
|
|
38
|
+
* response body converter; mutually exclusive with `path`
|
|
39
|
+
*/
|
|
40
|
+
as?: "string" | "json";
|
|
41
|
+
/**
|
|
42
|
+
* destination file path, resolved against project root if relative; mutually exclusive with `as`
|
|
43
|
+
*/
|
|
44
|
+
path?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Response returned by http.request
|
|
48
|
+
*/
|
|
49
|
+
interface response {
|
|
50
|
+
/**
|
|
51
|
+
* response code
|
|
52
|
+
*/
|
|
53
|
+
status: number;
|
|
54
|
+
/**
|
|
55
|
+
* response headers, where keys are lowercase and repeated headers have arrays of values
|
|
56
|
+
*/
|
|
57
|
+
headers: LuaTable<string, string | string[]>;
|
|
58
|
+
/**
|
|
59
|
+
* response body, present only when the `as` option was provided
|
|
60
|
+
*/
|
|
61
|
+
body?: unknown;
|
|
62
|
+
/**
|
|
63
|
+
* resolved absolute destination path, present after a successful response was written using the `path` option
|
|
64
|
+
*/
|
|
65
|
+
path?: string;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
15
68
|
namespace server {
|
|
69
|
+
type handler = (request: http.server.request) => LuaMultiReturn<[http.response | number | undefined, LuaTable<string, string> | undefined, string | undefined]>;
|
|
70
|
+
/**
|
|
71
|
+
* HTTP server request
|
|
72
|
+
*/
|
|
73
|
+
interface request {
|
|
74
|
+
/**
|
|
75
|
+
* route path parameter extracted from a path pattern
|
|
76
|
+
*/
|
|
77
|
+
"[string]": unknown;
|
|
78
|
+
/**
|
|
79
|
+
* full matched path, starting with `/`
|
|
80
|
+
*/
|
|
81
|
+
path: string;
|
|
82
|
+
/**
|
|
83
|
+
* HTTP request method, e.g. `"POST"`
|
|
84
|
+
*/
|
|
85
|
+
method: string;
|
|
86
|
+
/**
|
|
87
|
+
* request headers, keyed by lowercase header name
|
|
88
|
+
*/
|
|
89
|
+
headers: LuaTable<string, string | string[]>;
|
|
90
|
+
/**
|
|
91
|
+
* query string
|
|
92
|
+
*/
|
|
93
|
+
query?: string;
|
|
94
|
+
/**
|
|
95
|
+
* request body, whose type depends on the route's `as` argument
|
|
96
|
+
*/
|
|
97
|
+
body?: unknown;
|
|
98
|
+
}
|
|
16
99
|
/**
|
|
17
100
|
* Create HTTP response that will stream the content of a file defined by the path
|
|
18
101
|
*
|
|
@@ -21,7 +104,7 @@ declare global {
|
|
|
21
104
|
* @param headers - HTTP response headers, a table from lower-case header names to header values
|
|
22
105
|
* @returns HTTP response value, userdata
|
|
23
106
|
*/
|
|
24
|
-
function external_file_response(path: string, status?: number, headers?:
|
|
107
|
+
function external_file_response(path: string, status?: number, headers?: LuaMap<string, string> | Record<string, string>): http.response;
|
|
25
108
|
/**
|
|
26
109
|
* Create HTTP response with a JSON value
|
|
27
110
|
*
|
|
@@ -30,7 +113,7 @@ declare global {
|
|
|
30
113
|
* @param headers - HTTP response headers, a table from lower-case header names to header values
|
|
31
114
|
* @returns HTTP response value, userdata
|
|
32
115
|
*/
|
|
33
|
-
function json_response(value: unknown, status?: number, headers?:
|
|
116
|
+
function json_response(value: unknown, status?: number, headers?: LuaMap<string, string> | Record<string, string>): http.response;
|
|
34
117
|
/**
|
|
35
118
|
* Create HTTP response that will stream the content of a resource defined by the resource path
|
|
36
119
|
*
|
|
@@ -39,7 +122,7 @@ declare global {
|
|
|
39
122
|
* @param headers - HTTP response headers, a table from lower-case header names to header values
|
|
40
123
|
* @returns HTTP response value, userdata
|
|
41
124
|
*/
|
|
42
|
-
function resource_response(resource_path: string, status?: number, headers?:
|
|
125
|
+
function resource_response(resource_path: string, status?: number, headers?: LuaMap<string, string> | Record<string, string>): http.response;
|
|
43
126
|
/**
|
|
44
127
|
* Create HTTP response
|
|
45
128
|
*
|
|
@@ -48,7 +131,7 @@ declare global {
|
|
|
48
131
|
* @param body - HTTP response body
|
|
49
132
|
* @returns HTTP response value, userdata
|
|
50
133
|
*/
|
|
51
|
-
function response(status?: number, headers?:
|
|
134
|
+
function response(status?: number, headers?: LuaMap<string, string> | Record<string, string>, body?: string): http.response;
|
|
52
135
|
}
|
|
53
136
|
}
|
|
54
137
|
}
|
|
@@ -10,22 +10,22 @@ declare global {
|
|
|
10
10
|
* @param path - External file path, resolved against project root if relative
|
|
11
11
|
* @returns image userdata
|
|
12
12
|
*/
|
|
13
|
-
function load_file(path: string):
|
|
13
|
+
function load_file(path: string): editor.image;
|
|
14
14
|
/**
|
|
15
15
|
* Return the color of a pixel from a loaded image.
|
|
16
16
|
* Coordinates are 1-based, with `1, 1` at the top-left corner.
|
|
17
17
|
*
|
|
18
18
|
* @param image - image userdata returned by `image.load_file()`
|
|
19
|
-
* @param x - 1-based horizontal pixel coordinate
|
|
20
|
-
* @param y - 1-based vertical pixel coordinate
|
|
19
|
+
* @param x - 1-based horizontal pixel coordinate. **⚠️ 1-based; passed to Defold unchanged.**
|
|
20
|
+
* @param y - 1-based vertical pixel coordinate. **⚠️ 1-based; passed to Defold unchanged.**
|
|
21
21
|
*/
|
|
22
|
-
function pixel(image:
|
|
22
|
+
function pixel(image: editor.image, x: number, y: number): LuaMultiReturn<[number, number, number, number]>;
|
|
23
23
|
/**
|
|
24
24
|
* Iterate over pixels in a loaded image.
|
|
25
25
|
* The iterator returns pixels row by row from top-left to bottom-right. Coordinates are 1-based.
|
|
26
26
|
*
|
|
27
27
|
* @param image - image userdata returned by `image.load_file()`
|
|
28
|
-
* @returns iterator function returning `x, y, r, g, b, a` for each pixel
|
|
28
|
+
* @returns iterator function returning `x, y, r, g, b, a` for each pixel. **⚠️ 1-based; passed to Defold unchanged.**
|
|
29
29
|
* @example
|
|
30
30
|
* ```lua
|
|
31
31
|
* local img = image.load_file("assets/source.png")
|
|
@@ -35,13 +35,13 @@ declare global {
|
|
|
35
35
|
* end
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
function pixels(image:
|
|
38
|
+
function pixels(image: editor.image): (...args: unknown[]) => unknown;
|
|
39
39
|
/**
|
|
40
40
|
* Return the width and height of a loaded image.
|
|
41
41
|
*
|
|
42
42
|
* @param image - image userdata returned by `image.load_file()`
|
|
43
43
|
*/
|
|
44
|
-
function size(image:
|
|
44
|
+
function size(image: editor.image): LuaMultiReturn<[number, number]>;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -4,6 +4,17 @@ declare global {
|
|
|
4
4
|
* Editor scripting documentation
|
|
5
5
|
*/
|
|
6
6
|
namespace json {
|
|
7
|
+
namespace decode {
|
|
8
|
+
/**
|
|
9
|
+
* Options for json.decode
|
|
10
|
+
*/
|
|
11
|
+
interface options {
|
|
12
|
+
/**
|
|
13
|
+
* if true, decodes all JSON values in a string and returns an array
|
|
14
|
+
*/
|
|
15
|
+
all?: boolean;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
7
18
|
}
|
|
8
19
|
}
|
|
9
20
|
|
|
@@ -9,18 +9,18 @@ declare global {
|
|
|
9
9
|
/**
|
|
10
10
|
* Create a message pattern that renders a list with the "and" conjunction (for example: a, b, and c) once it is stringified
|
|
11
11
|
*
|
|
12
|
-
* @param items -
|
|
12
|
+
* @param items - array of values; each value may be `nil`, `boolean`, `number`, `string`, or another `message` instance
|
|
13
13
|
* @returns a userdata value that, when stringified with `tostring()`, will produce a localized text according to the currently selected language in the editor
|
|
14
14
|
*/
|
|
15
|
-
function and_list(items:
|
|
15
|
+
function and_list(items: (undefined | boolean | number | string | Opaque<"message">)[]): Opaque<"message">;
|
|
16
16
|
/**
|
|
17
17
|
* Create a message pattern that concatenates values (similar to `table.concat`) and performs the actual concatenation when stringified
|
|
18
18
|
*
|
|
19
|
-
* @param items -
|
|
19
|
+
* @param items - array of values; each value may be `nil`, `boolean`, `number`, `string`, or another `message` instance
|
|
20
20
|
* @param separator - optional separator inserted between values; defaults to an empty string
|
|
21
21
|
* @returns a userdata value that, when stringified with `tostring()`, will produce a localized text according to the currently selected language in the editor
|
|
22
22
|
*/
|
|
23
|
-
function concat(items:
|
|
23
|
+
function concat(items: (undefined | boolean | number | string | Opaque<"message">)[], separator?: boolean | number | string | Opaque<"message">): Opaque<"message">;
|
|
24
24
|
/**
|
|
25
25
|
* Create a message pattern for a localization key defined in an `.editor_localization` file; the actual localization happens when the returned value is stringified
|
|
26
26
|
*
|
|
@@ -28,14 +28,14 @@ declare global {
|
|
|
28
28
|
* @param vars - optional table with variables to be substituted in the localized string that uses ICU Message Format syntax; keys must be strings; values must be either `nil`, `boolean`, `number`, `string`, or another `message` instance
|
|
29
29
|
* @returns a userdata value that, when stringified with `tostring()`, will produce a localized text according to the currently selected language in the editor
|
|
30
30
|
*/
|
|
31
|
-
function message(key: string, vars?:
|
|
31
|
+
function message(key: string, vars?: LuaMap<string, undefined | boolean | number | string | Opaque<"message">> | Record<string, undefined | boolean | number | string | Opaque<"message">>): Opaque<"message">;
|
|
32
32
|
/**
|
|
33
33
|
* Create a message pattern that renders a list with the "or" conjunction (for example: a, b, or c) once it is stringified
|
|
34
34
|
*
|
|
35
|
-
* @param items -
|
|
35
|
+
* @param items - array of values; each value may be `nil`, `boolean`, `number`, `string`, or another `message` instance
|
|
36
36
|
* @returns a userdata value that, when stringified with `tostring()`, will produce a localized text according to the currently selected language in the editor
|
|
37
37
|
*/
|
|
38
|
-
function or_list(items:
|
|
38
|
+
function or_list(items: (undefined | boolean | number | string | Opaque<"message">)[]): Opaque<"message">;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|