@defold-typescript/types 0.42.0 → 0.44.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.
@@ -154,15 +154,6 @@
154
154
  },
155
155
  "availableIn": ["1.13.2", "1.13.1", "1.13.0"]
156
156
  },
157
- {
158
- "identity": {
159
- "namespace": "b2d.body",
160
- "kind": "FUNCTION",
161
- "name": "b2d.body.get_mass_data",
162
- "signature": "[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2MassData\\\">\"],\"isOptional\":false}]"
163
- },
164
- "availableIn": ["1.13.2", "1.13.1", "1.13.0"]
165
- },
166
157
  {
167
158
  "identity": {
168
159
  "namespace": "b2d.body",
@@ -226,15 +217,6 @@
226
217
  },
227
218
  "availableIn": ["1.13.2", "1.13.1", "1.13.0"]
228
219
  },
229
- {
230
- "identity": {
231
- "namespace": "b2d.body",
232
- "kind": "FUNCTION",
233
- "name": "b2d.body.get_transform",
234
- "signature": "[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2Transform\\\">\"],\"isOptional\":false}]"
235
- },
236
- "availableIn": ["1.13.2", "1.13.1", "1.13.0"]
237
- },
238
220
  {
239
221
  "identity": {
240
222
  "namespace": "b2d.body",
@@ -67,7 +67,6 @@
67
67
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_local_point\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false},{\"types\":[\"Vector3\"],\"isOptional\":false}]->[{\"types\":[\"Vector3\"],\"isOptional\":false}]": "function get_local_point(body: Opaque<\"b2Body\">, world_point: Vector3): Vector3;",
68
68
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_local_vector\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false},{\"types\":[\"Vector3\"],\"isOptional\":false}]->[{\"types\":[\"Vector3\"],\"isOptional\":false}]": "function get_local_vector(body: Opaque<\"b2Body\">, world_vector: Vector3): Vector3;",
69
69
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_mass(body: Opaque<\"b2Body\">): number;",
70
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2MassData\\\">\"],\"isOptional\":false}]": "function get_mass_data(body: Opaque<\"b2Body\">): Opaque<\"b2MassData\">;",
71
70
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_mass_data(body: Opaque<\"b2Body\">): b2d.mass_data;",
72
71
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_name\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"nil\",\"string\"],\"isOptional\":false}]": "function get_name(body: Opaque<\"b2Body\">): string | undefined;",
73
72
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_next\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2Body\\\">\",\"nil\"],\"isOptional\":false}]": "function get_next(body: Opaque<\"b2Body\">): Opaque<\"b2Body\"> | undefined;",
@@ -75,7 +74,6 @@
75
74
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_rotational_inertia\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_rotational_inertia(body: Opaque<\"b2Body\">): number;",
76
75
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_shapes\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_shapes(body: Opaque<\"b2Body\">): b2d.shape_info[];",
77
76
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_sleep_threshold\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_sleep_threshold(body: Opaque<\"b2Body\">): number;",
78
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2Transform\\\">\"],\"isOptional\":false}]": "function get_transform(body: Opaque<\"b2Body\">): Opaque<\"b2Transform\">;",
79
77
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_transform(body: Opaque<\"b2Body\">): b2d.transform;",
80
78
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_type\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"(number & { readonly __brand: \\\"b2d.body.B2_DYNAMIC_BODY\\\" }) | (number & { readonly __brand: \\\"b2d.body.B2_KINEMATIC_BODY\\\" }) | (number & { readonly __brand: \\\"b2d.body.B2_STATIC_BODY\\\" })\"],\"isOptional\":false}]": "function get_type(body: Opaque<\"b2Body\">): (number & { readonly __brand: \"b2d.body.B2_DYNAMIC_BODY\" }) | (number & { readonly __brand: \"b2d.body.B2_KINEMATIC_BODY\" }) | (number & { readonly __brand: \"b2d.body.B2_STATIC_BODY\" });",
81
79
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_world\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2World\\\">\"],\"isOptional\":false}]": "function get_world(body: Opaque<\"b2Body\">): Opaque<\"b2World\">;",
@@ -746,7 +744,7 @@
746
744
  "go\u0000FUNCTION\u0000go.cancel_animations\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"Hash\",\"string\"],\"isOptional\":true}]->[]": "function cancel_animations(url?: SceneAddress | Hash | Url, property?: string | Hash): void;",
747
745
  "go\u0000FUNCTION\u0000go.delete\u0000[{\"types\":[\"Hash\",\"Url\",\"boolean\",\"string\",\"table\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function _delete(id?: SceneGameObjectAddress | Hash | Url | (string | Hash | Url)[] | boolean, recursive?: boolean): void;",
748
746
  "go\u0000FUNCTION\u0000go.exists\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function exists(url: SceneGameObjectAddress | Hash | Url): boolean;",
749
- "go\u0000FUNCTION\u0000go.get\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\",\"string\"],\"isOptional\":false}]": "go.get<P>(): <K extends keyof P>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions) => P[K]\ngo.get<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions): go.properties[K]\ngo.get(url: SceneAddress | Hash | Url, property: string | Hash, options?: GoPropertyOptions): number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion",
747
+ "go\u0000FUNCTION\u0000go.get\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\",\"string\"],\"isOptional\":false}]": "go.get<P>(): <K extends keyof P>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions) => P[K]\ngo.get<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions): go.properties[K]\ngo.get(url: SceneAddress | Hash | Url, property: string | Hash, options?: GoPropertyOptions): number | boolean | string | Hash | Url | Vector3 | Vector4 | Quaternion",
750
748
  "go\u0000FUNCTION\u0000go.get_id\u0000[{\"types\":[\"string\"],\"isOptional\":true}]->[{\"types\":[\"Hash\"],\"isOptional\":false}]": "function get_id(path?: string): Hash;",
751
749
  "go\u0000FUNCTION\u0000go.get_parent\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"nil\"],\"isOptional\":false}]": "function get_parent(id?: SceneGameObjectAddress | Hash | Url): Hash | undefined;",
752
750
  "go\u0000FUNCTION\u0000go.get_position\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Vector3\"],\"isOptional\":false}]": "function get_position(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
@@ -759,7 +757,7 @@
759
757
  "go\u0000FUNCTION\u0000go.get_world_scale_uniform\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_world_scale_uniform(id?: SceneGameObjectAddress | Hash | Url): number;",
760
758
  "go\u0000FUNCTION\u0000go.get_world_transform\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Matrix4\"],\"isOptional\":false}]": "function get_world_transform(id?: SceneGameObjectAddress | Hash | Url): Matrix4;",
761
759
  "go\u0000FUNCTION\u0000go.property\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\",\"string\"],\"isOptional\":false}]->[]": "go.property(name: string, value: number): ScriptProperty<number>\ngo.property(name: string, value: boolean): ScriptProperty<boolean>\ngo.property(name: string, value: Hash): ScriptProperty<Hash>\ngo.property(name: string, value: Url): ScriptProperty<Url>\ngo.property(name: string, value: Vector3): ScriptProperty<Vector3>\ngo.property(name: string, value: Vector4): ScriptProperty<Vector4>\ngo.property(name: string, value: Quaternion): ScriptProperty<Quaternion>\ngo.property(name: string, value: string): ScriptProperty<string>",
762
- "go\u0000FUNCTION\u0000go.set\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\",\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[]": "go.set<P>(): <K extends WritableKey<P>>(url: SceneAddress | Hash | Url, property: K, value: P[K], options?: GoPropertyOptions) => void\ngo.set<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, value: go.properties[K], options?: GoPropertyOptions): void\ngo.set(url: SceneAddress | Hash | Url, property: string | Hash, value: number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion | Vector4[], options?: GoPropertyOptions): void",
760
+ "go\u0000FUNCTION\u0000go.set\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\",\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[]": "go.set<P>(): <K extends WritableKey<P>>(url: SceneAddress | Hash | Url, property: K, value: P[K], options?: GoPropertyOptions) => void\ngo.set<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, value: go.properties[K], options?: GoPropertyOptions): void\ngo.set(url: SceneAddress | Hash | Url, property: string | Hash, value: number | boolean | string | Hash | Url | Vector3 | Vector4 | Quaternion | Vector4[], options?: GoPropertyOptions): void",
763
761
  "go\u0000FUNCTION\u0000go.set_parent\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function set_parent(id?: SceneGameObjectAddress | Hash | Url, parent_id?: SceneGameObjectAddress | Hash | Url, keep_world_transform?: boolean): void;",
764
762
  "go\u0000FUNCTION\u0000go.set_position\u0000[{\"types\":[\"Vector3\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[]": "function set_position(position: Vector3, id?: SceneGameObjectAddress | Hash | Url): void;",
765
763
  "go\u0000FUNCTION\u0000go.set_rotation\u0000[{\"types\":[\"Quaternion\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[]": "function set_rotation(rotation: Quaternion, id?: SceneGameObjectAddress | Hash | Url): void;",
@@ -1839,7 +1837,6 @@
1839
1837
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_local_point\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false},{\"types\":[\"Vector3\"],\"isOptional\":false}]->[{\"types\":[\"Vector3\"],\"isOptional\":false}]": "function get_local_point(body: Opaque<\"b2Body\">, world_point: Vector3): Vector3;",
1840
1838
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_local_vector\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false},{\"types\":[\"Vector3\"],\"isOptional\":false}]->[{\"types\":[\"Vector3\"],\"isOptional\":false}]": "function get_local_vector(body: Opaque<\"b2Body\">, world_vector: Vector3): Vector3;",
1841
1839
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_mass(body: Opaque<\"b2Body\">): number;",
1842
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2MassData\\\">\"],\"isOptional\":false}]": "function get_mass_data(body: Opaque<\"b2Body\">): Opaque<\"b2MassData\">;",
1843
1840
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_mass_data(body: Opaque<\"b2Body\">): { mass: number; center: Vector3; inertia: number };",
1844
1841
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_name\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": "function get_name(body: Opaque<\"b2Body\">): string;",
1845
1842
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_next\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]": "function get_next(body: Opaque<\"b2Body\">): Opaque<\"b2Body\">;",
@@ -1847,7 +1844,6 @@
1847
1844
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_rotational_inertia\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_rotational_inertia(body: Opaque<\"b2Body\">): number;",
1848
1845
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_shapes\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_shapes(body: Opaque<\"b2Body\">): { shape_id: number }[];",
1849
1846
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_sleep_threshold\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_sleep_threshold(body: Opaque<\"b2Body\">): number;",
1850
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2Transform\\\">\"],\"isOptional\":false}]": "function get_transform(body: Opaque<\"b2Body\">): Opaque<\"b2Transform\">;",
1851
1847
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_transform(body: Opaque<\"b2Body\">): { position: Vector3; angle: number };",
1852
1848
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_type\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"(number & { readonly __brand: \\\"b2d.body.B2_DYNAMIC_BODY\\\" }) | (number & { readonly __brand: \\\"b2d.body.B2_KINEMATIC_BODY\\\" }) | (number & { readonly __brand: \\\"b2d.body.B2_STATIC_BODY\\\" })\"],\"isOptional\":false}]": "function get_type(body: Opaque<\"b2Body\">): (number & { readonly __brand: \"b2d.body.B2_DYNAMIC_BODY\" }) | (number & { readonly __brand: \"b2d.body.B2_KINEMATIC_BODY\" }) | (number & { readonly __brand: \"b2d.body.B2_STATIC_BODY\" });",
1853
1849
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_world\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2World\\\">\"],\"isOptional\":false}]": "function get_world(body: Opaque<\"b2Body\">): Opaque<\"b2World\">;",
@@ -2260,7 +2256,7 @@
2260
2256
  "go\u0000FUNCTION\u0000go.cancel_animations\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"Hash\",\"string\"],\"isOptional\":true}]->[]": "function cancel_animations(url?: SceneAddress | Hash | Url, property?: string | Hash): void;",
2261
2257
  "go\u0000FUNCTION\u0000go.delete\u0000[{\"types\":[\"Hash\",\"Url\",\"boolean\",\"string\",\"table\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function _delete(id?: SceneGameObjectAddress | Hash | Url | (SceneGameObjectAddress | Hash | Url)[] | boolean, recursive?: boolean): void;",
2262
2258
  "go\u0000FUNCTION\u0000go.exists\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function exists(url: SceneGameObjectAddress | Hash | Url): boolean;",
2263
- "go\u0000FUNCTION\u0000go.get\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false}]": "go.get<P>(): <K extends keyof P>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions) => P[K]\ngo.get<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions): go.properties[K]\ngo.get(url: SceneAddress | Hash | Url, property: string | Hash, options?: GoPropertyOptions): number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion",
2259
+ "go\u0000FUNCTION\u0000go.get\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false}]": "go.get<P>(): <K extends keyof P>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions) => P[K]\ngo.get<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions): go.properties[K]\ngo.get(url: SceneAddress | Hash | Url, property: string | Hash, options?: GoPropertyOptions): number | boolean | string | Hash | Url | Vector3 | Vector4 | Quaternion",
2264
2260
  "go\u0000FUNCTION\u0000go.get_id\u0000[{\"types\":[\"string\"],\"isOptional\":true}]->[{\"types\":[\"Hash\"],\"isOptional\":false}]": "function get_id(path?: string): Hash;",
2265
2261
  "go\u0000FUNCTION\u0000go.get_parent\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"nil\"],\"isOptional\":false}]": "function get_parent(id?: SceneGameObjectAddress | Hash | Url): Hash | undefined;",
2266
2262
  "go\u0000FUNCTION\u0000go.get_position\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Vector3\"],\"isOptional\":false}]": "function get_position(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
@@ -2273,7 +2269,7 @@
2273
2269
  "go\u0000FUNCTION\u0000go.get_world_scale_uniform\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_world_scale_uniform(id?: SceneGameObjectAddress | Hash | Url): number;",
2274
2270
  "go\u0000FUNCTION\u0000go.get_world_transform\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Matrix4\"],\"isOptional\":false}]": "function get_world_transform(id?: SceneGameObjectAddress | Hash | Url): Matrix4;",
2275
2271
  "go\u0000FUNCTION\u0000go.property\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false}]->[]": "go.property(name: string, value: number): ScriptProperty<number>\ngo.property(name: string, value: boolean): ScriptProperty<boolean>\ngo.property(name: string, value: Hash): ScriptProperty<Hash>\ngo.property(name: string, value: Url): ScriptProperty<Url>\ngo.property(name: string, value: Vector3): ScriptProperty<Vector3>\ngo.property(name: string, value: Vector4): ScriptProperty<Vector4>\ngo.property(name: string, value: Quaternion): ScriptProperty<Quaternion>\ngo.property(name: string, value: string): ScriptProperty<string>",
2276
- "go\u0000FUNCTION\u0000go.set\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[]": "go.set<P>(): <K extends WritableKey<P>>(url: SceneAddress | Hash | Url, property: K, value: P[K], options?: GoPropertyOptions) => void\ngo.set<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, value: go.properties[K], options?: GoPropertyOptions): void\ngo.set(url: SceneAddress | Hash | Url, property: string | Hash, value: number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion | Vector4[], options?: GoPropertyOptions): void",
2272
+ "go\u0000FUNCTION\u0000go.set\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[]": "go.set<P>(): <K extends WritableKey<P>>(url: SceneAddress | Hash | Url, property: K, value: P[K], options?: GoPropertyOptions) => void\ngo.set<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, value: go.properties[K], options?: GoPropertyOptions): void\ngo.set(url: SceneAddress | Hash | Url, property: string | Hash, value: number | boolean | string | Hash | Url | Vector3 | Vector4 | Quaternion | Vector4[], options?: GoPropertyOptions): void",
2277
2273
  "go\u0000FUNCTION\u0000go.set_parent\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function set_parent(id?: SceneGameObjectAddress | Hash | Url, parent_id?: SceneGameObjectAddress | Hash | Url, keep_world_transform?: boolean): void;",
2278
2274
  "go\u0000FUNCTION\u0000go.set_position\u0000[{\"types\":[\"Vector3\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[]": "function set_position(position: Vector3, id?: SceneGameObjectAddress | Hash | Url): void;",
2279
2275
  "go\u0000FUNCTION\u0000go.set_rotation\u0000[{\"types\":[\"Quaternion\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[]": "function set_rotation(rotation: Quaternion, id?: SceneGameObjectAddress | Hash | Url): void;",
@@ -3206,7 +3202,6 @@
3206
3202
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_local_point\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false},{\"types\":[\"Vector3\"],\"isOptional\":false}]->[{\"types\":[\"Vector3\"],\"isOptional\":false}]": "function get_local_point(body: Opaque<\"b2Body\">, world_point: Vector3): Vector3;",
3207
3203
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_local_vector\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false},{\"types\":[\"Vector3\"],\"isOptional\":false}]->[{\"types\":[\"Vector3\"],\"isOptional\":false}]": "function get_local_vector(body: Opaque<\"b2Body\">, world_vector: Vector3): Vector3;",
3208
3204
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_mass(body: Opaque<\"b2Body\">): number;",
3209
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2MassData\\\">\"],\"isOptional\":false}]": "function get_mass_data(body: Opaque<\"b2Body\">): Opaque<\"b2MassData\">;",
3210
3205
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_mass_data(body: Opaque<\"b2Body\">): { mass: number; center: Vector3; inertia: number };",
3211
3206
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_name\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"string\"],\"isOptional\":false}]": "function get_name(body: Opaque<\"b2Body\">): string;",
3212
3207
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_next\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]": "function get_next(body: Opaque<\"b2Body\">): Opaque<\"b2Body\">;",
@@ -3214,7 +3209,6 @@
3214
3209
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_rotational_inertia\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_rotational_inertia(body: Opaque<\"b2Body\">): number;",
3215
3210
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_shapes\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_shapes(body: Opaque<\"b2Body\">): { shape_id: number }[];",
3216
3211
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_sleep_threshold\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_sleep_threshold(body: Opaque<\"b2Body\">): number;",
3217
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2Transform\\\">\"],\"isOptional\":false}]": "function get_transform(body: Opaque<\"b2Body\">): Opaque<\"b2Transform\">;",
3218
3212
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": "function get_transform(body: Opaque<\"b2Body\">): { position: Vector3; angle: number };",
3219
3213
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_type\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"(number & { readonly __brand: \\\"b2d.body.B2_DYNAMIC_BODY\\\" }) | (number & { readonly __brand: \\\"b2d.body.B2_KINEMATIC_BODY\\\" }) | (number & { readonly __brand: \\\"b2d.body.B2_STATIC_BODY\\\" })\"],\"isOptional\":false}]": "function get_type(body: Opaque<\"b2Body\">): (number & { readonly __brand: \"b2d.body.B2_DYNAMIC_BODY\" }) | (number & { readonly __brand: \"b2d.body.B2_KINEMATIC_BODY\" }) | (number & { readonly __brand: \"b2d.body.B2_STATIC_BODY\" });",
3220
3214
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_world\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2World\\\">\"],\"isOptional\":false}]": "function get_world(body: Opaque<\"b2Body\">): Opaque<\"b2World\">;",
@@ -3626,7 +3620,7 @@
3626
3620
  "go\u0000FUNCTION\u0000go.cancel_animations\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"Hash\",\"string\"],\"isOptional\":true}]->[]": "function cancel_animations(url?: SceneAddress | Hash | Url, property?: string | Hash): void;",
3627
3621
  "go\u0000FUNCTION\u0000go.delete\u0000[{\"types\":[\"Hash\",\"Url\",\"boolean\",\"string\",\"table\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function _delete(id?: SceneGameObjectAddress | Hash | Url | (SceneGameObjectAddress | Hash | Url)[] | boolean, recursive?: boolean): void;",
3628
3622
  "go\u0000FUNCTION\u0000go.exists\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function exists(url: SceneGameObjectAddress | Hash | Url): boolean;",
3629
- "go\u0000FUNCTION\u0000go.get\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false}]": "go.get<P>(): <K extends keyof P>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions) => P[K]\ngo.get<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions): go.properties[K]\ngo.get(url: SceneAddress | Hash | Url, property: string | Hash, options?: GoPropertyOptions): number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion",
3623
+ "go\u0000FUNCTION\u0000go.get\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false}]": "go.get<P>(): <K extends keyof P>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions) => P[K]\ngo.get<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions): go.properties[K]\ngo.get(url: SceneAddress | Hash | Url, property: string | Hash, options?: GoPropertyOptions): number | boolean | string | Hash | Url | Vector3 | Vector4 | Quaternion",
3630
3624
  "go\u0000FUNCTION\u0000go.get_id\u0000[{\"types\":[\"string\"],\"isOptional\":true}]->[{\"types\":[\"Hash\"],\"isOptional\":false}]": "function get_id(path?: string): Hash;",
3631
3625
  "go\u0000FUNCTION\u0000go.get_parent\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"nil\"],\"isOptional\":false}]": "function get_parent(id?: SceneGameObjectAddress | Hash | Url): Hash | undefined;",
3632
3626
  "go\u0000FUNCTION\u0000go.get_position\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Vector3\"],\"isOptional\":false}]": "function get_position(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
@@ -3639,7 +3633,7 @@
3639
3633
  "go\u0000FUNCTION\u0000go.get_world_scale_uniform\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_world_scale_uniform(id?: SceneGameObjectAddress | Hash | Url): number;",
3640
3634
  "go\u0000FUNCTION\u0000go.get_world_transform\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Matrix4\"],\"isOptional\":false}]": "function get_world_transform(id?: SceneGameObjectAddress | Hash | Url): Matrix4;",
3641
3635
  "go\u0000FUNCTION\u0000go.property\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false}]->[]": "go.property(name: string, value: number): ScriptProperty<number>\ngo.property(name: string, value: boolean): ScriptProperty<boolean>\ngo.property(name: string, value: Hash): ScriptProperty<Hash>\ngo.property(name: string, value: Url): ScriptProperty<Url>\ngo.property(name: string, value: Vector3): ScriptProperty<Vector3>\ngo.property(name: string, value: Vector4): ScriptProperty<Vector4>\ngo.property(name: string, value: Quaternion): ScriptProperty<Quaternion>\ngo.property(name: string, value: string): ScriptProperty<string>",
3642
- "go\u0000FUNCTION\u0000go.set\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[]": "go.set<P>(): <K extends WritableKey<P>>(url: SceneAddress | Hash | Url, property: K, value: P[K], options?: GoPropertyOptions) => void\ngo.set<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, value: go.properties[K], options?: GoPropertyOptions): void\ngo.set(url: SceneAddress | Hash | Url, property: string | Hash, value: number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion | Vector4[], options?: GoPropertyOptions): void",
3636
+ "go\u0000FUNCTION\u0000go.set\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[]": "go.set<P>(): <K extends WritableKey<P>>(url: SceneAddress | Hash | Url, property: K, value: P[K], options?: GoPropertyOptions) => void\ngo.set<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, value: go.properties[K], options?: GoPropertyOptions): void\ngo.set(url: SceneAddress | Hash | Url, property: string | Hash, value: number | boolean | string | Hash | Url | Vector3 | Vector4 | Quaternion | Vector4[], options?: GoPropertyOptions): void",
3643
3637
  "go\u0000FUNCTION\u0000go.set_parent\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function set_parent(id?: SceneGameObjectAddress | Hash | Url, parent_id?: SceneGameObjectAddress | Hash | Url, keep_world_transform?: boolean): void;",
3644
3638
  "go\u0000FUNCTION\u0000go.set_position\u0000[{\"types\":[\"Vector3\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[]": "function set_position(position: Vector3, id?: SceneGameObjectAddress | Hash | Url): void;",
3645
3639
  "go\u0000FUNCTION\u0000go.set_rotation\u0000[{\"types\":[\"Quaternion\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[]": "function set_rotation(rotation: Quaternion, id?: SceneGameObjectAddress | Hash | Url): void;",
@@ -4725,7 +4719,7 @@
4725
4719
  "go\u0000FUNCTION\u0000go.cancel_animations\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"Hash\",\"string\"],\"isOptional\":true}]->[]": "function cancel_animations(url?: SceneAddress | Hash | Url, property?: string | Hash): void;",
4726
4720
  "go\u0000FUNCTION\u0000go.delete\u0000[{\"types\":[\"Hash\",\"Url\",\"boolean\",\"string\",\"table\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function _delete(id?: SceneGameObjectAddress | Hash | Url | (SceneGameObjectAddress | Hash | Url)[] | boolean, recursive?: boolean): void;",
4727
4721
  "go\u0000FUNCTION\u0000go.exists\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false}]->[{\"types\":[\"boolean\"],\"isOptional\":false}]": "function exists(url: SceneGameObjectAddress | Hash | Url): boolean;",
4728
- "go\u0000FUNCTION\u0000go.get\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false}]": "go.get<P>(): <K extends keyof P>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions) => P[K]\ngo.get<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions): go.properties[K]\ngo.get(url: SceneAddress | Hash | Url, property: string | Hash, options?: GoPropertyOptions): number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion",
4722
+ "go\u0000FUNCTION\u0000go.get\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false}]": "go.get<P>(): <K extends keyof P>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions) => P[K]\ngo.get<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, options?: GoPropertyOptions): go.properties[K]\ngo.get(url: SceneAddress | Hash | Url, property: string | Hash, options?: GoPropertyOptions): number | boolean | string | Hash | Url | Vector3 | Vector4 | Quaternion",
4729
4723
  "go\u0000FUNCTION\u0000go.get_id\u0000[{\"types\":[\"string\"],\"isOptional\":true}]->[{\"types\":[\"Hash\"],\"isOptional\":false}]": "function get_id(path?: string): Hash;",
4730
4724
  "go\u0000FUNCTION\u0000go.get_parent\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Hash\",\"nil\"],\"isOptional\":false}]": "function get_parent(id?: SceneGameObjectAddress | Hash | Url): Hash | undefined;",
4731
4725
  "go\u0000FUNCTION\u0000go.get_position\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Vector3\"],\"isOptional\":false}]": "function get_position(id?: SceneGameObjectAddress | Hash | Url): Vector3;",
@@ -4738,7 +4732,7 @@
4738
4732
  "go\u0000FUNCTION\u0000go.get_world_scale_uniform\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"number\"],\"isOptional\":false}]": "function get_world_scale_uniform(id?: SceneGameObjectAddress | Hash | Url): number;",
4739
4733
  "go\u0000FUNCTION\u0000go.get_world_transform\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[{\"types\":[\"Matrix4\"],\"isOptional\":false}]": "function get_world_transform(id?: SceneGameObjectAddress | Hash | Url): Matrix4;",
4740
4734
  "go\u0000FUNCTION\u0000go.property\u0000[{\"types\":[\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false}]->[]": "go.property(name: string, value: number): ScriptProperty<number>\ngo.property(name: string, value: boolean): ScriptProperty<boolean>\ngo.property(name: string, value: Hash): ScriptProperty<Hash>\ngo.property(name: string, value: Url): ScriptProperty<Url>\ngo.property(name: string, value: Vector3): ScriptProperty<Vector3>\ngo.property(name: string, value: Vector4): ScriptProperty<Vector4>\ngo.property(name: string, value: Quaternion): ScriptProperty<Quaternion>\ngo.property(name: string, value: string): ScriptProperty<string>",
4741
- "go\u0000FUNCTION\u0000go.set\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[]": "go.set<P>(): <K extends WritableKey<P>>(url: SceneAddress | Hash | Url, property: K, value: P[K], options?: GoPropertyOptions) => void\ngo.set<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, value: go.properties[K], options?: GoPropertyOptions): void\ngo.set(url: SceneAddress | Hash | Url, property: string | Hash, value: number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion | Vector4[], options?: GoPropertyOptions): void",
4735
+ "go\u0000FUNCTION\u0000go.set\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"string\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Opaque<\\\"resource\\\">\",\"Quaternion\",\"Url\",\"Vector3\",\"Vector4\",\"boolean\",\"number\"],\"isOptional\":false},{\"types\":[\"table\"],\"isOptional\":true}]->[]": "go.set<P>(): <K extends WritableKey<P>>(url: SceneAddress | Hash | Url, property: K, value: P[K], options?: GoPropertyOptions) => void\ngo.set<K extends keyof go.properties>(url: SceneAddress | Hash | Url, property: K, value: go.properties[K], options?: GoPropertyOptions): void\ngo.set(url: SceneAddress | Hash | Url, property: string | Hash, value: number | boolean | string | Hash | Url | Vector3 | Vector4 | Quaternion | Vector4[], options?: GoPropertyOptions): void",
4742
4736
  "go\u0000FUNCTION\u0000go.set_parent\u0000[{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true},{\"types\":[\"boolean\"],\"isOptional\":true}]->[]": "function set_parent(id?: SceneGameObjectAddress | Hash | Url, parent_id?: SceneGameObjectAddress | Hash | Url, keep_world_transform?: boolean): void;",
4743
4737
  "go\u0000FUNCTION\u0000go.set_position\u0000[{\"types\":[\"Vector3\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[]": "function set_position(position: Vector3, id?: SceneGameObjectAddress | Hash | Url): void;",
4744
4738
  "go\u0000FUNCTION\u0000go.set_rotation\u0000[{\"types\":[\"Quaternion\"],\"isOptional\":false},{\"types\":[\"Hash\",\"Url\",\"string\"],\"isOptional\":true}]->[]": "function set_rotation(rotation: Quaternion, id?: SceneGameObjectAddress | Hash | Url): void;",
@@ -5720,10 +5714,6 @@
5720
5714
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
5721
5715
  "return:0:mass": { "type": "number", "optional": false }
5722
5716
  },
5723
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2MassData\\\">\"],\"isOptional\":false}]": {
5724
- "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
5725
- "return:0:data": { "type": "Opaque<\"b2MassData\">", "optional": false }
5726
- },
5727
5717
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
5728
5718
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
5729
5719
  "return:0:data": { "type": "b2d.mass_data", "optional": false }
@@ -5752,10 +5742,6 @@
5752
5742
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
5753
5743
  "return:0:threshold": { "type": "number", "optional": false }
5754
5744
  },
5755
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2Transform\\\">\"],\"isOptional\":false}]": {
5756
- "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
5757
- "return:0:transform": { "type": "Opaque<\"b2Transform\">", "optional": false }
5758
- },
5759
5745
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
5760
5746
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
5761
5747
  "return:0:transform": { "type": "b2d.transform", "optional": false }
@@ -10565,10 +10551,6 @@
10565
10551
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
10566
10552
  "return:0:mass": { "type": "number", "optional": false }
10567
10553
  },
10568
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2MassData\\\">\"],\"isOptional\":false}]": {
10569
- "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
10570
- "return:0:data": { "type": "Opaque<\"b2MassData\">", "optional": false }
10571
- },
10572
10554
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
10573
10555
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
10574
10556
  "return:0:data": {
@@ -10600,10 +10582,6 @@
10600
10582
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
10601
10583
  "return:0:threshold": { "type": "number", "optional": false }
10602
10584
  },
10603
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2Transform\\\">\"],\"isOptional\":false}]": {
10604
- "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
10605
- "return:0:transform": { "type": "Opaque<\"b2Transform\">", "optional": false }
10606
- },
10607
10585
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
10608
10586
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
10609
10587
  "return:0:transform": { "type": "{ position: Vector3; angle: number }", "optional": false }
@@ -14527,10 +14505,6 @@
14527
14505
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
14528
14506
  "return:0:mass": { "type": "number", "optional": false }
14529
14507
  },
14530
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2MassData\\\">\"],\"isOptional\":false}]": {
14531
- "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
14532
- "return:0:data": { "type": "Opaque<\"b2MassData\">", "optional": false }
14533
- },
14534
14508
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_mass_data\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
14535
14509
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
14536
14510
  "return:0:data": {
@@ -14562,10 +14536,6 @@
14562
14536
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
14563
14537
  "return:0:threshold": { "type": "number", "optional": false }
14564
14538
  },
14565
- "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"Opaque<\\\"b2Transform\\\">\"],\"isOptional\":false}]": {
14566
- "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
14567
- "return:0:transform": { "type": "Opaque<\"b2Transform\">", "optional": false }
14568
- },
14569
14539
  "b2d.body\u0000FUNCTION\u0000b2d.body.get_transform\u0000[{\"types\":[\"Opaque<\\\"b2Body\\\">\"],\"isOptional\":false}]->[{\"types\":[\"table\"],\"isOptional\":false}]": {
14570
14540
  "param:0:body": { "type": "Opaque<\"b2Body\">", "optional": false },
14571
14541
  "return:0:transform": { "type": "{ position: Vector3; angle: number }", "optional": false }
package/api-targets.json CHANGED
@@ -28,6 +28,14 @@
28
28
  "name": "set_mass_data",
29
29
  "param": "data",
30
30
  "type": "b2MassData"
31
+ },
32
+ {
33
+ "name": "get_transform",
34
+ "returns": "b2Transform"
35
+ },
36
+ {
37
+ "name": "get_mass_data",
38
+ "returns": "b2MassData"
31
39
  }
32
40
  ]
33
41
  },
@@ -411,6 +419,14 @@
411
419
  "name": "set_mass_data",
412
420
  "param": "data",
413
421
  "type": "b2MassData"
422
+ },
423
+ {
424
+ "name": "get_transform",
425
+ "returns": "b2Transform"
426
+ },
427
+ {
428
+ "name": "get_mass_data",
429
+ "returns": "b2MassData"
414
430
  }
415
431
  ]
416
432
  },
@@ -763,6 +779,14 @@
763
779
  "name": "set_mass_data",
764
780
  "param": "data",
765
781
  "type": "b2MassData"
782
+ },
783
+ {
784
+ "name": "get_transform",
785
+ "returns": "b2Transform"
786
+ },
787
+ {
788
+ "name": "get_mass_data",
789
+ "returns": "b2MassData"
766
790
  }
767
791
  ]
768
792
  },
@@ -310,13 +310,6 @@ declare global {
310
310
  * @returns the mass data
311
311
  */
312
312
  function get_mass_data(body: Opaque<"b2Body">): b2d.mass_data;
313
- /**
314
- * Get the mass data of the body.
315
- *
316
- * @param body - body
317
- * @returns a struct containing the mass, inertia and center of the body.
318
- */
319
- function get_mass_data(body: Opaque<"b2Body">): Opaque<"b2MassData">;
320
313
  /**
321
314
  * Get the body name.
322
315
  *
@@ -366,13 +359,6 @@ declare global {
366
359
  * @returns the body transform
367
360
  */
368
361
  function get_transform(body: Opaque<"b2Body">): b2d.transform;
369
- /**
370
- * Get the body transform for the body's origin.
371
- *
372
- * @param body - body
373
- * @returns the world position of the body's origin.
374
- */
375
- function get_transform(body: Opaque<"b2Body">): Opaque<"b2Transform">;
376
362
  /**
377
363
  * Get the type of this body.
378
364
  *
@@ -339,13 +339,6 @@ declare global {
339
339
  * @returns table with `mass`, `center` in local coordinates, and `inertia`.
340
340
  */
341
341
  function get_mass_data(body: Opaque<"b2Body">): { mass: number; center: Vector3; inertia: number };
342
- /**
343
- * Get the mass data of the body.
344
- *
345
- * @param body - body
346
- * @returns a struct containing the mass, inertia and center of the body.
347
- */
348
- function get_mass_data(body: Opaque<"b2Body">): Opaque<"b2MassData">;
349
342
  /**
350
343
  * Get the body name.
351
344
  *
@@ -395,13 +388,6 @@ declare global {
395
388
  * @returns table with `position` and `angle` in radians.
396
389
  */
397
390
  function get_transform(body: Opaque<"b2Body">): { position: Vector3; angle: number };
398
- /**
399
- * Get the body transform for the body's origin.
400
- *
401
- * @param body - body
402
- * @returns the world position of the body's origin.
403
- */
404
- function get_transform(body: Opaque<"b2Body">): Opaque<"b2Transform">;
405
391
  /**
406
392
  * Get the type of this body.
407
393
  *
@@ -339,13 +339,6 @@ declare global {
339
339
  * @returns table with `mass`, `center` in local coordinates, and `inertia`.
340
340
  */
341
341
  function get_mass_data(body: Opaque<"b2Body">): { mass: number; center: Vector3; inertia: number };
342
- /**
343
- * Get the mass data of the body.
344
- *
345
- * @param body - body
346
- * @returns a struct containing the mass, inertia and center of the body.
347
- */
348
- function get_mass_data(body: Opaque<"b2Body">): Opaque<"b2MassData">;
349
342
  /**
350
343
  * Get the body name.
351
344
  *
@@ -395,13 +388,6 @@ declare global {
395
388
  * @returns table with `position` and `angle` in radians.
396
389
  */
397
390
  function get_transform(body: Opaque<"b2Body">): { position: Vector3; angle: number };
398
- /**
399
- * Get the body transform for the body's origin.
400
- *
401
- * @param body - body
402
- * @returns the world position of the body's origin.
403
- */
404
- function get_transform(body: Opaque<"b2Body">): Opaque<"b2Transform">;
405
391
  /**
406
392
  * Get the type of this body.
407
393
  *
package/hsm/async.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ // Generated from packages/hsm/src/async.ts by `bun run --cwd packages/hsm declarations`; do not edit.
2
+ import type { EventObject, TaskStart } from "./index";
3
+ /** @noSelf */
4
+ export interface SequenceSignal {
5
+ readonly aborted: boolean;
6
+ readonly wait: (seconds: number) => Promise<void>;
7
+ }
8
+ export declare function sequence<Ctx, E extends EventObject>(run: (ctx: Ctx, signal: SequenceSignal) => Promise<NoInfer<E> | void>): TaskStart<Ctx, E>;
package/hsm/debug.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ // Generated from packages/hsm/src/debug.ts by `bun run --cwd packages/hsm declarations`; do not edit.
2
+ import type { EventObject, MachineInstance } from "./index";
3
+ /** @noSelf */
4
+ export interface MachineInspector {
5
+ readonly draw: (target: Hash | Url | string) => void;
6
+ }
7
+ export declare function inspect<Ctx, E extends EventObject, P extends string>(instance: MachineInstance<Ctx, E, P>, label: string): MachineInspector;
@@ -0,0 +1,10 @@
1
+ // Generated from packages/hsm/src/defold.ts by `bun run --cwd packages/hsm declarations`; do not edit.
2
+ export type MessageEvent<K extends MessageId> = K extends MessageId ? {
3
+ readonly type: K;
4
+ readonly sender: Url;
5
+ } & Omit<MessagePayload<K>, "type" | "sender"> : never;
6
+ /** @noSelf */
7
+ export interface MessageEventMapper<K extends MessageId> {
8
+ readonly toEvent: (message_id: Hash, message: Record<string | number, unknown>, sender: Url) => MessageEvent<K> | undefined;
9
+ }
10
+ export declare function messageEvents<const K extends MessageId>(ids: readonly K[]): MessageEventMapper<K>;
package/hsm/index.d.ts ADDED
@@ -0,0 +1,179 @@
1
+ // Generated from packages/hsm/src/index.ts by `bun run --cwd packages/hsm declarations`; do not edit.
2
+ export interface EventObject {
3
+ readonly type: string;
4
+ }
5
+ export type MoveCause = "event" | "after" | "update" | "stop" | "reload" | "always";
6
+ /** @noSelf */
7
+ export type MoveListener<E extends EventObject, P extends string = string> = (from: P, to: P | undefined, cause: MoveCause, event: E | undefined) => void;
8
+ /** @noSelf */
9
+ export interface MachineInstance<Ctx, E extends EventObject, P extends string = string> {
10
+ readonly ctx: Ctx;
11
+ readonly path: P | undefined;
12
+ readonly leaves: readonly P[];
13
+ readonly matches: (path: P) => boolean;
14
+ readonly send: (event: E) => void;
15
+ readonly update: (dt: number) => void;
16
+ readonly stop: () => void;
17
+ /**
18
+ * Adds a listener called after each move completes, with the leaf left, the leaf entered and
19
+ * the cause. It is not called for the first entry at `start` or for a move with no `to`; a
20
+ * parallel machine calls it once per moved region. Each call adds a listener, and the returned
21
+ * function removes that one.
22
+ */
23
+ readonly onMove: (listener: MoveListener<E, P>) => () => void;
24
+ }
25
+ export type MoveAction<Ctx, E extends EventObject, V extends E = E> = (ctx: Ctx, event: V, machine: MachineInstance<Ctx, E>) => void;
26
+ /** @noSelf */
27
+ export interface TransitionConfig<Ctx, E extends EventObject, V extends E = E> {
28
+ /**
29
+ * The full path of the state to move to. A `to` naming the state the rule is on exits and
30
+ * re-enters it, restarting its timers and `task`; a `to` below it keeps it active.
31
+ */
32
+ readonly to?: string;
33
+ /**
34
+ * The rule is taken only when this returns `true`. It must have no side effects: it is also
35
+ * checked when the move does not happen, in guarded lists and on every `always` recheck.
36
+ */
37
+ readonly when?: (ctx: Ctx, event: V) => boolean;
38
+ /**
39
+ * Runs during the move. The event is accepted when its key matches and `when` passes; then
40
+ * `exit` runs on each state left, deepest first; then `run`; then `enter` on each state
41
+ * entered, outermost first. Shared ancestors neither exit nor enter. A rule with no `to` runs
42
+ * only `run`.
43
+ */
44
+ readonly run?: MoveAction<Ctx, E, V> | readonly MoveAction<Ctx, E, V>[];
45
+ /** Renamed to `to`. */
46
+ readonly target?: never;
47
+ /** Renamed to `when`. */
48
+ readonly guard?: never;
49
+ /** Renamed to `run`. */
50
+ readonly actions?: never;
51
+ /** Removed: a `to` naming the state the rule is on restarts it. */
52
+ readonly reenter?: never;
53
+ }
54
+ export type TransitionSpec<Ctx, E extends EventObject, V extends E = E> = string | TransitionConfig<Ctx, E, V> | readonly [TransitionConfig<Ctx, E, V>, ...TransitionConfig<Ctx, E, V>[]];
55
+ /** @noSelf */
56
+ export interface AlwaysConfig<Ctx> {
57
+ readonly to: string;
58
+ /** Checked on every recheck, so it must have no side effects. */
59
+ readonly when?: (ctx: Ctx) => boolean;
60
+ /** Renamed to `to`. */
61
+ readonly target?: never;
62
+ /** Renamed to `when`. */
63
+ readonly guard?: never;
64
+ }
65
+ export type AlwaysSpec<Ctx> = string | AlwaysConfig<Ctx> | readonly [AlwaysConfig<Ctx>, ...AlwaysConfig<Ctx>[]];
66
+ export type OnConfig<Ctx, E extends EventObject> = {
67
+ readonly [K in E["type"]]?: TransitionSpec<Ctx, E, Extract<E, {
68
+ type: K;
69
+ }>>;
70
+ };
71
+ /**
72
+ * Runs on every way in (`enter`) or out (`exit`) of the state: a move, `start` and `stop`. A hot
73
+ * reload enters the states it adds, but drops a removed state without its `exit`. It gets no
74
+ * event; event data reaches `enter` through `ctx`, set in `run`.
75
+ */
76
+ export type StateHook<Ctx, E extends EventObject> = (ctx: Ctx, machine: MachineInstance<Ctx, E>) => void;
77
+ export type UpdateHook<Ctx, E extends EventObject> = (ctx: Ctx, dt: number, machine: MachineInstance<Ctx, E>) => string | undefined;
78
+ /**
79
+ * Starts work that lives as long as the state. `finish` sends one event and is ignored after the
80
+ * first call or once the state is left. The returned cleanup runs on every way out.
81
+ * @noSelf
82
+ */
83
+ export type TaskStart<Ctx, E extends EventObject> = (ctx: Ctx, finish: (event: E) => void, machine: MachineInstance<Ctx, E>) => (() => void) | void;
84
+ /** @noSelf */
85
+ export interface StateConfig<Ctx, E extends EventObject> {
86
+ readonly type?: "parallel";
87
+ readonly initial?: string;
88
+ readonly restoreDepth?: number | "all";
89
+ readonly states?: {
90
+ readonly [name: string]: StateConfig<Ctx, E>;
91
+ };
92
+ readonly on?: OnConfig<Ctx, E>;
93
+ readonly after?: {
94
+ readonly [seconds: number]: string;
95
+ };
96
+ readonly always?: AlwaysSpec<Ctx>;
97
+ readonly enter?: StateHook<Ctx, E>;
98
+ readonly exit?: StateHook<Ctx, E>;
99
+ readonly update?: UpdateHook<Ctx, E>;
100
+ /** Started on each entry; see `TaskStart`. */
101
+ readonly task?: TaskStart<Ctx, E>;
102
+ /** Renamed to `task`. */
103
+ readonly invoke?: never;
104
+ }
105
+ export interface MachineConfig<Ctx, E extends EventObject> extends StateConfig<Ctx, E> {
106
+ readonly initial: string;
107
+ readonly states: {
108
+ readonly [name: string]: StateConfig<Ctx, E>;
109
+ };
110
+ }
111
+ /** @noSelf */
112
+ export interface Machine<Ctx, E extends EventObject, P extends string = string> {
113
+ readonly start: (ctx: Ctx) => MachineInstance<Ctx, E, P>;
114
+ }
115
+ type PathDepth = [never, 0, 1, 2, 3];
116
+ type PathsBelow<S, D extends number> = S extends {
117
+ readonly states: infer Children;
118
+ } ? {
119
+ [K in keyof Children & string]: K | `${K}/${D extends 1 ? Children[K] extends {
120
+ readonly states: object;
121
+ } ? string : never : PathsBelow<Children[K], PathDepth[D]>}`;
122
+ }[keyof Children & string] : never;
123
+ export type StatePath<C> = `/${PathsBelow<C, 4>}`;
124
+ type NextCount = [never, 2, 3, 4, 5, 6];
125
+ type RestoreCountBelow<Children, D extends number> = {
126
+ [K in keyof Children]: RestoreCount<Children[K], D>;
127
+ }[keyof Children];
128
+ type RestoreCount<S, D extends number> = S extends {
129
+ readonly states: infer Children;
130
+ } ? [D] extends [never] ? number : S extends {
131
+ readonly type: "parallel";
132
+ } ? RestoreCountBelow<Children, PathDepth[D]> : 1 | (RestoreCountBelow<Children, PathDepth[D]> extends infer N ? N extends number ? number extends N ? number : NextCount[N] : never : never) : never;
133
+ interface TransitionCheck<T> {
134
+ readonly to?: T;
135
+ readonly when?: unknown;
136
+ readonly run?: unknown;
137
+ }
138
+ type SpecCheck<T> = T | TransitionCheck<T> | readonly TransitionCheck<T>[];
139
+ type PathCheck<S, Self extends string, All extends string, Ev extends string> = {
140
+ readonly type?: unknown;
141
+ readonly initial?: S extends {
142
+ readonly type: "parallel";
143
+ } ? never : S extends {
144
+ readonly states: infer Children;
145
+ } ? `${Self}/${keyof Children & string}` : never;
146
+ readonly restoreDepth?: S extends {
147
+ readonly type: "parallel";
148
+ } ? never : S extends {
149
+ readonly states: object;
150
+ } ? RestoreCount<S, 4> | "all" : never;
151
+ readonly states?: S extends {
152
+ readonly states: infer Children;
153
+ } ? {
154
+ readonly [K in keyof Children]: PathCheck<Children[K], `${Self}/${K & string}`, All, Ev>;
155
+ } : unknown;
156
+ readonly on?: S extends {
157
+ readonly on: infer On;
158
+ } ? {
159
+ readonly [K in keyof On]: K extends Ev ? SpecCheck<All> : never;
160
+ } : unknown;
161
+ readonly after?: S extends {
162
+ readonly after: infer After;
163
+ } ? {
164
+ readonly [K in keyof After]: All;
165
+ } : unknown;
166
+ readonly always?: S extends {
167
+ readonly always: unknown;
168
+ } ? SpecCheck<All> : unknown;
169
+ readonly enter?: unknown;
170
+ readonly exit?: unknown;
171
+ readonly update?: unknown;
172
+ readonly task?: unknown;
173
+ };
174
+ export interface MachineConfigError {
175
+ readonly "hsm: an initial or a to names an unknown state path, or an on key an unknown event": never;
176
+ }
177
+ export type DefinedMachine<Ctx, E extends EventObject, C> = C extends PathCheck<C, "", StatePath<C>, E["type"]> ? Machine<Ctx, E, StatePath<C>> : MachineConfigError;
178
+ export declare function defineMachine<Ctx, E extends EventObject>(key?: string): <const C extends MachineConfig<Ctx, E>>(config: C) => DefinedMachine<Ctx, E, C>;
179
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defold-typescript/types",
3
- "version": "0.42.0",
3
+ "version": "0.44.0",
4
4
  "description": "TypeScript types for the Defold engine's Lua APIs.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -45,6 +45,18 @@
45
45
  "./timers": {
46
46
  "types": "./src/timers.d.ts"
47
47
  },
48
+ "./hsm": {
49
+ "types": "./hsm/index.d.ts"
50
+ },
51
+ "./hsm/async": {
52
+ "types": "./hsm/async.d.ts"
53
+ },
54
+ "./hsm/debug": {
55
+ "types": "./hsm/debug.d.ts"
56
+ },
57
+ "./hsm/defold": {
58
+ "types": "./hsm/defold.d.ts"
59
+ },
48
60
  "./api-availability.json": "./api-availability.json",
49
61
  "./api-signatures.json": "./api-signatures.json",
50
62
  "./url-parameters.json": "./url-parameters.json",
@@ -53,6 +65,7 @@
53
65
  "files": [
54
66
  "src",
55
67
  "generated",
68
+ "hsm",
56
69
  "scripts",
57
70
  "api-targets.json",
58
71
  "api-migrations.json",
package/src/api-doc.ts CHANGED
@@ -268,13 +268,16 @@ export function parseDefoldApiDoc(input: unknown): ApiModule {
268
268
  }
269
269
 
270
270
  // Withholds one overload of a documented function — the one whose `param` has
271
- // exactly the upstream type `type` — while its same-named siblings still emit.
271
+ // exactly the upstream type `type`, or whose return value has exactly the
272
+ // upstream type `returns` — while its same-named siblings still emit.
272
273
  // `name` is the local name, like a `skipFunctions` rule.
273
- export interface SkipOverloadRule {
274
- readonly name: string;
275
- readonly param: string;
276
- readonly type: string;
277
- }
274
+ export type SkipOverloadRule = { readonly name: string } & (
275
+ | { readonly param: string; readonly type: string }
276
+ | { readonly returns: string }
277
+ );
278
+
279
+ const hasExactType = (slot: ApiParameter, type: string): boolean =>
280
+ slot.types.length === 1 && slot.types[0] === type;
278
281
 
279
282
  export function withholdOverloads(
280
283
  module: ApiModule,
@@ -283,15 +286,16 @@ export function withholdOverloads(
283
286
  let functions = module.functions;
284
287
  for (const rule of rules) {
285
288
  const fqn = `${module.namespace}.${rule.name}`;
286
- const kept = functions.filter(
287
- (fn) =>
288
- fn.name !== fqn ||
289
- !fn.parameters.some(
290
- (p) => p.name === rule.param && p.types.length === 1 && p.types[0] === rule.type,
291
- ),
292
- );
289
+ const matches =
290
+ "returns" in rule
291
+ ? (fn: ApiFunction) => fn.returnValues.some((r) => hasExactType(r, rule.returns))
292
+ : (fn: ApiFunction) =>
293
+ fn.parameters.some((p) => p.name === rule.param && hasExactType(p, rule.type));
294
+ const kept = functions.filter((fn) => fn.name !== fqn || !matches(fn));
293
295
  if (kept.length === functions.length) {
294
- throw new Error(`skipOverloads: ${fqn} has no overload whose ${rule.param} is ${rule.type}`);
296
+ const selector =
297
+ "returns" in rule ? `return value is ${rule.returns}` : `${rule.param} is ${rule.type}`;
298
+ throw new Error(`skipOverloads: ${fqn} has no overload whose ${selector}`);
295
299
  }
296
300
  functions = kept;
297
301
  }
@@ -54,7 +54,8 @@ declare global {
54
54
  * `handler`, so each documented call shape is its own overload. An optional
55
55
  * is supplied only when every earlier optional is: `method` and `as` are
56
56
  * both strings, so a form that skipped `method` alone would be
57
- * indistinguishable from one that supplied it.
57
+ * indistinguishable from one that supplied it. A table `openapi` is
58
+ * distinguishable by type, so it may follow `path` or `method` directly.
58
59
  *
59
60
  * @param path - HTTP URI path, starts with `/`; may include path patterns (`{name}` for a single segment and `{*name}` for the rest of the request path) that will be extracted from the path and provided to the handler as a part of the request
60
61
  * @param method - HTTP request method, default `"GET"`
@@ -78,6 +79,17 @@ declare global {
78
79
  */
79
80
  function route(path: string, handler: HttpRouteHandler): unknown;
80
81
  function route(path: string, method: string, handler: HttpRouteHandler): unknown;
82
+ function route(
83
+ path: string,
84
+ openapi: Record<string | number, unknown>,
85
+ handler: HttpRouteHandler,
86
+ ): unknown;
87
+ function route(
88
+ path: string,
89
+ method: string,
90
+ openapi: Record<string | number, unknown>,
91
+ handler: HttpRouteHandler,
92
+ ): unknown;
81
93
  function route(path: string, method: string, as: string, handler: HttpRouteHandler): unknown;
82
94
  function route(
83
95
  path: string,
@@ -144,7 +156,7 @@ declare global {
144
156
  *
145
157
  * @param output_path - output zip file path, resolved against project root if relative
146
158
  * @param opts - compression options
147
- * @param entries - entries to compress, either a relative path or a list of entries
159
+ * @param entries - list of files and folders to compress
148
160
  * @example
149
161
  * ```ts
150
162
  * // Archive a file and a folder:
@@ -14,9 +14,9 @@
14
14
  export type ZipEntry = string | readonly string[] | Record<string | number, unknown>;
15
15
 
16
16
  /**
17
- * What `zip.pack` compresses: a single relative path, or a list of entries.
17
+ * What `zip.pack` compresses: a list of entries.
18
18
  */
19
- export type ZipEntries = string | readonly ZipEntry[];
19
+ export type ZipEntries = readonly ZipEntry[];
20
20
 
21
21
  /**
22
22
  * Archive-wide compression options for `zip.pack`.
@@ -38,6 +38,7 @@ declare global {
38
38
  * - key hash or string name of internal property
39
39
  * - keys array of hashes or strings identifying internal component resources (e.g. a particle fx emitter, see examples below)
40
40
  * @returns the value of the specified property
41
+ * A `string` value is a text property, which needs Defold 1.13.2 or later.
41
42
  * @example
42
43
  * ```ts
43
44
  * const position = go.get("#sprite", "position");
@@ -60,13 +61,14 @@ declare global {
60
61
  url: SceneAddress | Hash | Url,
61
62
  property: string | Hash,
62
63
  options?: GoPropertyOptions,
63
- ): number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion;
64
+ ): number | boolean | string | Hash | Url | Vector3 | Vector4 | Quaternion;
64
65
  /**
65
66
  * sets a named property of the specified game object or component, or a material constant
66
67
  *
67
68
  * @param url - url of the game object or component having the property
68
69
  * @param property - id of the property to set
69
70
  * @param value - the value to set, or an array of vector4 to set a material property array
71
+ * A `string` value is a text property, which needs Defold 1.13.2 or later.
70
72
  * @param options - optional options table
71
73
  * - index integer **⚠️ 1-based index into an array property; passed to Defold unchanged.**
72
74
  * - key hash or string name of internal property
@@ -95,7 +97,7 @@ declare global {
95
97
  function set(
96
98
  url: SceneAddress | Hash | Url,
97
99
  property: string | Hash,
98
- value: number | boolean | Hash | Url | Vector3 | Vector4 | Quaternion | Vector4[],
100
+ value: number | boolean | string | Hash | Url | Vector3 | Vector4 | Quaternion | Vector4[],
99
101
  options?: GoPropertyOptions,
100
102
  ): void;
101
103
  /**