@defold-typescript/types 0.52.0 → 0.54.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-signatures.json +2074 -1964
- package/dist/cli-runtime.js +8966 -0
- package/dist/identity-vocabulary.json +660 -0
- package/dist/src/index.d.ts +18 -0
- package/examples/translations.json +15 -15
- package/fixtures/defold-1.12.4/b2d_body_doc.json +1327 -0
- package/fixtures/defold-1.12.4/b2d_doc.json +107 -0
- package/fixtures/defold-1.12.4/base_doc.json +758 -0
- package/fixtures/defold-1.12.4/bit_doc.json +404 -0
- package/fixtures/defold-1.12.4/buffer_doc.json +422 -0
- package/fixtures/defold-1.12.4/camera_doc.json +664 -0
- package/fixtures/defold-1.12.4/collectionfactory_doc.json +219 -0
- package/fixtures/defold-1.12.4/collectionproxy_doc.json +289 -0
- package/fixtures/defold-1.12.4/coroutine_doc.json +151 -0
- package/fixtures/defold-1.12.4/crash_doc.json +497 -0
- package/fixtures/defold-1.12.4/debug_doc.json +410 -0
- package/fixtures/defold-1.12.4/factory_doc.json +219 -0
- package/fixtures/defold-1.12.4/font_doc.json +141 -0
- package/fixtures/defold-1.12.4/globals_doc.json +42 -0
- package/fixtures/defold-1.12.4/go-instance-functions.json +111 -0
- package/fixtures/defold-1.12.4/go_doc.json +1901 -0
- package/fixtures/defold-1.12.4/graphics_doc.json +1634 -0
- package/fixtures/defold-1.12.4/gui_doc.json +5249 -0
- package/fixtures/defold-1.12.4/html5_doc.json +64 -0
- package/fixtures/defold-1.12.4/http_doc.json +66 -0
- package/fixtures/defold-1.12.4/image_doc.json +170 -0
- package/fixtures/defold-1.12.4/io_doc.json +399 -0
- package/fixtures/defold-1.12.4/json_doc.json +97 -0
- package/fixtures/defold-1.12.4/label_doc.json +220 -0
- package/fixtures/defold-1.12.4/liveupdate_doc.json +308 -0
- package/fixtures/defold-1.12.4/math_doc.json +702 -0
- package/fixtures/defold-1.12.4/messages_doc.json +579 -0
- package/fixtures/defold-1.12.4/model_doc.json +315 -0
- package/fixtures/defold-1.12.4/msg_doc.json +137 -0
- package/fixtures/defold-1.12.4/os_doc.json +266 -0
- package/fixtures/defold-1.12.4/package_doc.json +139 -0
- package/fixtures/defold-1.12.4/particlefx_doc.json +249 -0
- package/fixtures/defold-1.12.4/physics_doc.json +1120 -0
- package/fixtures/defold-1.12.4/profiler_doc.json +375 -0
- package/fixtures/defold-1.12.4/render_doc.json +1167 -0
- package/fixtures/defold-1.12.4/resource_doc.json +762 -0
- package/fixtures/defold-1.12.4/socket_doc.json +2194 -0
- package/fixtures/defold-1.12.4/sound_doc.json +582 -0
- package/fixtures/defold-1.12.4/sprite_doc.json +245 -0
- package/fixtures/defold-1.12.4/string_doc.json +412 -0
- package/fixtures/defold-1.12.4/sys_doc.json +853 -0
- package/fixtures/defold-1.12.4/table_doc.json +166 -0
- package/fixtures/defold-1.12.4/tilemap_doc.json +374 -0
- package/fixtures/defold-1.12.4/timer_doc.json +153 -0
- package/fixtures/defold-1.12.4/types_doc.json +212 -0
- package/fixtures/defold-1.12.4/vmath_doc.json +1814 -0
- package/fixtures/defold-1.12.4/window_doc.json +388 -0
- package/fixtures/defold-1.12.4/zlib_doc.json +70 -0
- package/fixtures/defold-1.13.0/b2d_body_doc.json +2428 -0
- package/fixtures/defold-1.13.0/b2d_chain_doc.json +394 -0
- package/fixtures/defold-1.13.0/b2d_doc.json +128 -0
- package/fixtures/defold-1.13.0/b2d_fixture_doc.json +594 -0
- package/fixtures/defold-1.13.0/b2d_joint_doc.json +3315 -0
- package/fixtures/defold-1.13.0/b2d_shape_doc.json +802 -0
- package/fixtures/defold-1.13.0/b2d_world_doc.json +1314 -0
- package/fixtures/defold-1.13.0/base_doc.json +758 -0
- package/fixtures/defold-1.13.0/bit_doc.json +404 -0
- package/fixtures/defold-1.13.0/buffer_doc.json +422 -0
- package/fixtures/defold-1.13.0/camera_doc.json +900 -0
- package/fixtures/defold-1.13.0/collectionfactory_doc.json +219 -0
- package/fixtures/defold-1.13.0/collectionproxy_doc.json +289 -0
- package/fixtures/defold-1.13.0/compute_doc.json +182 -0
- package/fixtures/defold-1.13.0/coroutine_doc.json +151 -0
- package/fixtures/defold-1.13.0/crash_doc.json +497 -0
- package/fixtures/defold-1.13.0/debug_doc.json +410 -0
- package/fixtures/defold-1.13.0/editor_doc.json +3665 -0
- package/fixtures/defold-1.13.0/editor_http_doc.json +273 -0
- package/fixtures/defold-1.13.0/editor_json_doc.json +59 -0
- package/fixtures/defold-1.13.0/editor_localization_doc.json +138 -0
- package/fixtures/defold-1.13.0/editor_pprint_doc.json +36 -0
- package/fixtures/defold-1.13.0/editor_tilemap_tiles_doc.json +235 -0
- package/fixtures/defold-1.13.0/editor_zip_doc.json +163 -0
- package/fixtures/defold-1.13.0/editor_zlib_doc.json +48 -0
- package/fixtures/defold-1.13.0/factory_doc.json +219 -0
- package/fixtures/defold-1.13.0/font_doc.json +141 -0
- package/fixtures/defold-1.13.0/globals_doc.json +42 -0
- package/fixtures/defold-1.13.0/go-instance-functions.json +101 -0
- package/fixtures/defold-1.13.0/go_doc.json +1989 -0
- package/fixtures/defold-1.13.0/graphics_doc.json +1886 -0
- package/fixtures/defold-1.13.0/gui_doc.json +5277 -0
- package/fixtures/defold-1.13.0/html5_doc.json +64 -0
- package/fixtures/defold-1.13.0/http_doc.json +66 -0
- package/fixtures/defold-1.13.0/image_doc.json +170 -0
- package/fixtures/defold-1.13.0/import-manifest.json +10558 -0
- package/fixtures/defold-1.13.0/io_doc.json +399 -0
- package/fixtures/defold-1.13.0/json_doc.json +97 -0
- package/fixtures/defold-1.13.0/label_doc.json +220 -0
- package/fixtures/defold-1.13.0/liveupdate_doc.json +330 -0
- package/fixtures/defold-1.13.0/material_doc.json +238 -0
- package/fixtures/defold-1.13.0/math_doc.json +702 -0
- package/fixtures/defold-1.13.0/model_doc.json +412 -0
- package/fixtures/defold-1.13.0/msg_doc.json +137 -0
- package/fixtures/defold-1.13.0/os_doc.json +266 -0
- package/fixtures/defold-1.13.0/package_doc.json +139 -0
- package/fixtures/defold-1.13.0/particlefx_doc.json +249 -0
- package/fixtures/defold-1.13.0/physics_doc.json +1492 -0
- package/fixtures/defold-1.13.0/profiler_doc.json +375 -0
- package/fixtures/defold-1.13.0/render_doc.json +1381 -0
- package/fixtures/defold-1.13.0/resource_doc.json +762 -0
- package/fixtures/defold-1.13.0/socket_doc.json +2194 -0
- package/fixtures/defold-1.13.0/sound_doc.json +582 -0
- package/fixtures/defold-1.13.0/sprite_doc.json +335 -0
- package/fixtures/defold-1.13.0/string_doc.json +412 -0
- package/fixtures/defold-1.13.0/sys_doc.json +1142 -0
- package/fixtures/defold-1.13.0/table_doc.json +166 -0
- package/fixtures/defold-1.13.0/tilemap_doc.json +402 -0
- package/fixtures/defold-1.13.0/timer_doc.json +153 -0
- package/fixtures/defold-1.13.0/types_doc.json +212 -0
- package/fixtures/defold-1.13.0/vmath_doc.json +1814 -0
- package/fixtures/defold-1.13.0/window_doc.json +388 -0
- package/fixtures/defold-1.13.0/zlib_doc.json +70 -0
- package/fixtures/defold-1.13.1/b2d_body_doc.json +2428 -0
- package/fixtures/defold-1.13.1/b2d_chain_doc.json +394 -0
- package/fixtures/defold-1.13.1/b2d_doc.json +128 -0
- package/fixtures/defold-1.13.1/b2d_fixture_doc.json +594 -0
- package/fixtures/defold-1.13.1/b2d_joint_doc.json +3315 -0
- package/fixtures/defold-1.13.1/b2d_shape_doc.json +802 -0
- package/fixtures/defold-1.13.1/b2d_world_doc.json +1314 -0
- package/fixtures/defold-1.13.1/base_doc.json +758 -0
- package/fixtures/defold-1.13.1/bit_doc.json +404 -0
- package/fixtures/defold-1.13.1/buffer_doc.json +422 -0
- package/fixtures/defold-1.13.1/camera_doc.json +900 -0
- package/fixtures/defold-1.13.1/collectionfactory_doc.json +219 -0
- package/fixtures/defold-1.13.1/collectionproxy_doc.json +323 -0
- package/fixtures/defold-1.13.1/compute_doc.json +182 -0
- package/fixtures/defold-1.13.1/coroutine_doc.json +151 -0
- package/fixtures/defold-1.13.1/crash_doc.json +497 -0
- package/fixtures/defold-1.13.1/debug_doc.json +410 -0
- package/fixtures/defold-1.13.1/editor_doc.json +3880 -0
- package/fixtures/defold-1.13.1/editor_http_doc.json +273 -0
- package/fixtures/defold-1.13.1/editor_image_doc.json +128 -0
- package/fixtures/defold-1.13.1/editor_json_doc.json +59 -0
- package/fixtures/defold-1.13.1/editor_localization_doc.json +138 -0
- package/fixtures/defold-1.13.1/editor_pprint_doc.json +36 -0
- package/fixtures/defold-1.13.1/editor_tilemap_tiles_doc.json +235 -0
- package/fixtures/defold-1.13.1/editor_zip_doc.json +163 -0
- package/fixtures/defold-1.13.1/editor_zlib_doc.json +48 -0
- package/fixtures/defold-1.13.1/factory_doc.json +219 -0
- package/fixtures/defold-1.13.1/font_doc.json +141 -0
- package/fixtures/defold-1.13.1/globals_doc.json +42 -0
- package/fixtures/defold-1.13.1/go-instance-functions.json +102 -0
- package/fixtures/defold-1.13.1/go_doc.json +1989 -0
- package/fixtures/defold-1.13.1/graphics_doc.json +1886 -0
- package/fixtures/defold-1.13.1/gui_doc.json +5277 -0
- package/fixtures/defold-1.13.1/html5_doc.json +64 -0
- package/fixtures/defold-1.13.1/http_doc.json +66 -0
- package/fixtures/defold-1.13.1/image_doc.json +170 -0
- package/fixtures/defold-1.13.1/import-manifest.json +10091 -0
- package/fixtures/defold-1.13.1/io_doc.json +399 -0
- package/fixtures/defold-1.13.1/json_doc.json +97 -0
- package/fixtures/defold-1.13.1/label_doc.json +220 -0
- package/fixtures/defold-1.13.1/liveupdate_doc.json +330 -0
- package/fixtures/defold-1.13.1/material_doc.json +238 -0
- package/fixtures/defold-1.13.1/math_doc.json +702 -0
- package/fixtures/defold-1.13.1/model_doc.json +412 -0
- package/fixtures/defold-1.13.1/msg_doc.json +137 -0
- package/fixtures/defold-1.13.1/os_doc.json +266 -0
- package/fixtures/defold-1.13.1/package_doc.json +139 -0
- package/fixtures/defold-1.13.1/particlefx_doc.json +249 -0
- package/fixtures/defold-1.13.1/physics_doc.json +1492 -0
- package/fixtures/defold-1.13.1/profiler_doc.json +375 -0
- package/fixtures/defold-1.13.1/render_doc.json +1381 -0
- package/fixtures/defold-1.13.1/resource_doc.json +762 -0
- package/fixtures/defold-1.13.1/socket_doc.json +2194 -0
- package/fixtures/defold-1.13.1/sound_doc.json +582 -0
- package/fixtures/defold-1.13.1/sprite_doc.json +335 -0
- package/fixtures/defold-1.13.1/string_doc.json +412 -0
- package/fixtures/defold-1.13.1/sys_doc.json +1142 -0
- package/fixtures/defold-1.13.1/table_doc.json +166 -0
- package/fixtures/defold-1.13.1/tilemap_doc.json +402 -0
- package/fixtures/defold-1.13.1/timer_doc.json +153 -0
- package/fixtures/defold-1.13.1/types_doc.json +212 -0
- package/fixtures/defold-1.13.1/vmath_doc.json +1814 -0
- package/fixtures/defold-1.13.1/window_doc.json +388 -0
- package/fixtures/defold-1.13.1/zlib_doc.json +70 -0
- package/fixtures/defold-1.13.2/b2d_body_doc.json +2359 -0
- package/fixtures/defold-1.13.2/b2d_chain_doc.json +395 -0
- package/fixtures/defold-1.13.2/b2d_doc.json +1945 -0
- package/fixtures/defold-1.13.2/b2d_fixture_doc.json +595 -0
- package/fixtures/defold-1.13.2/b2d_joint_doc.json +3178 -0
- package/fixtures/defold-1.13.2/b2d_shape_doc.json +767 -0
- package/fixtures/defold-1.13.2/b2d_world_doc.json +1315 -0
- package/fixtures/defold-1.13.2/base_doc.json +759 -0
- package/fixtures/defold-1.13.2/bit_doc.json +405 -0
- package/fixtures/defold-1.13.2/buffer_doc.json +393 -0
- package/fixtures/defold-1.13.2/bullet3d_collision_object_doc.json +1206 -0
- package/fixtures/defold-1.13.2/bullet3d_constraint_doc.json +2455 -0
- package/fixtures/defold-1.13.2/bullet3d_doc.json +215 -0
- package/fixtures/defold-1.13.2/bullet3d_rigid_body_doc.json +1376 -0
- package/fixtures/defold-1.13.2/bullet3d_shape_doc.json +430 -0
- package/fixtures/defold-1.13.2/bullet3d_world_doc.json +855 -0
- package/fixtures/defold-1.13.2/camera_doc.json +887 -0
- package/fixtures/defold-1.13.2/collectionfactory_doc.json +206 -0
- package/fixtures/defold-1.13.2/collectionproxy_doc.json +397 -0
- package/fixtures/defold-1.13.2/compute_doc.json +183 -0
- package/fixtures/defold-1.13.2/coroutine_doc.json +152 -0
- package/fixtures/defold-1.13.2/crash_doc.json +483 -0
- package/fixtures/defold-1.13.2/debug_doc.json +411 -0
- package/fixtures/defold-1.13.2/editor_doc.json +6320 -0
- package/fixtures/defold-1.13.2/editor_http_doc.json +476 -0
- package/fixtures/defold-1.13.2/editor_image_doc.json +129 -0
- package/fixtures/defold-1.13.2/editor_json_doc.json +81 -0
- package/fixtures/defold-1.13.2/editor_localization_doc.json +139 -0
- package/fixtures/defold-1.13.2/editor_pprint_doc.json +37 -0
- package/fixtures/defold-1.13.2/editor_tilemap_tiles_doc.json +292 -0
- package/fixtures/defold-1.13.2/editor_zip_doc.json +237 -0
- package/fixtures/defold-1.13.2/editor_zlib_doc.json +49 -0
- package/fixtures/defold-1.13.2/factory_doc.json +206 -0
- package/fixtures/defold-1.13.2/font_doc.json +230 -0
- package/fixtures/defold-1.13.2/globals_doc.json +64 -0
- package/fixtures/defold-1.13.2/go-instance-functions.json +106 -0
- package/fixtures/defold-1.13.2/go_doc.json +1789 -0
- package/fixtures/defold-1.13.2/graphics_doc.json +1211 -0
- package/fixtures/defold-1.13.2/gui_doc.json +4735 -0
- package/fixtures/defold-1.13.2/html5_doc.json +65 -0
- package/fixtures/defold-1.13.2/http_doc.json +174 -0
- package/fixtures/defold-1.13.2/image_doc.json +298 -0
- package/fixtures/defold-1.13.2/import-manifest.json +10902 -0
- package/fixtures/defold-1.13.2/io_doc.json +400 -0
- package/fixtures/defold-1.13.2/json_doc.json +140 -0
- package/fixtures/defold-1.13.2/label_doc.json +427 -0
- package/fixtures/defold-1.13.2/liveupdate_doc.json +221 -0
- package/fixtures/defold-1.13.2/material_doc.json +773 -0
- package/fixtures/defold-1.13.2/math_doc.json +703 -0
- package/fixtures/defold-1.13.2/model_doc.json +472 -0
- package/fixtures/defold-1.13.2/msg_doc.json +169 -0
- package/fixtures/defold-1.13.2/os_doc.json +269 -0
- package/fixtures/defold-1.13.2/package_doc.json +140 -0
- package/fixtures/defold-1.13.2/particlefx_doc.json +249 -0
- package/fixtures/defold-1.13.2/physics_doc.json +1624 -0
- package/fixtures/defold-1.13.2/profiler_doc.json +348 -0
- package/fixtures/defold-1.13.2/render_doc.json +1623 -0
- package/fixtures/defold-1.13.2/resource_doc.json +1539 -0
- package/fixtures/defold-1.13.2/socket_doc.json +2335 -0
- package/fixtures/defold-1.13.2/sound_doc.json +673 -0
- package/fixtures/defold-1.13.2/sprite_doc.json +364 -0
- package/fixtures/defold-1.13.2/string_doc.json +413 -0
- package/fixtures/defold-1.13.2/sys_doc.json +1347 -0
- package/fixtures/defold-1.13.2/table_doc.json +167 -0
- package/fixtures/defold-1.13.2/tilemap_doc.json +369 -0
- package/fixtures/defold-1.13.2/timer_doc.json +214 -0
- package/fixtures/defold-1.13.2/types_doc.json +213 -0
- package/fixtures/defold-1.13.2/vmath_doc.json +2056 -0
- package/fixtures/defold-1.13.2/window_doc.json +426 -0
- package/fixtures/defold-1.13.2/zlib_doc.json +71 -0
- package/fixtures/defold-1.14.0/b2d_body_doc.json +2359 -0
- package/fixtures/defold-1.14.0/b2d_chain_doc.json +395 -0
- package/fixtures/defold-1.14.0/b2d_doc.json +1973 -0
- package/fixtures/defold-1.14.0/b2d_fixture_doc.json +595 -0
- package/fixtures/defold-1.14.0/b2d_joint_doc.json +3178 -0
- package/fixtures/defold-1.14.0/b2d_shape_doc.json +767 -0
- package/fixtures/defold-1.14.0/b2d_world_doc.json +1315 -0
- package/fixtures/defold-1.14.0/base_doc.json +759 -0
- package/fixtures/defold-1.14.0/bit_doc.json +405 -0
- package/fixtures/defold-1.14.0/buffer_doc.json +393 -0
- package/fixtures/defold-1.14.0/bullet3d_collision_object_doc.json +1206 -0
- package/fixtures/defold-1.14.0/bullet3d_constraint_doc.json +2455 -0
- package/fixtures/defold-1.14.0/bullet3d_doc.json +243 -0
- package/fixtures/defold-1.14.0/bullet3d_rigid_body_doc.json +1376 -0
- package/fixtures/defold-1.14.0/bullet3d_shape_doc.json +430 -0
- package/fixtures/defold-1.14.0/bullet3d_world_doc.json +855 -0
- package/fixtures/defold-1.14.0/camera_doc.json +887 -0
- package/fixtures/defold-1.14.0/collectionfactory_doc.json +206 -0
- package/fixtures/defold-1.14.0/collectionproxy_doc.json +397 -0
- package/fixtures/defold-1.14.0/compute_doc.json +183 -0
- package/fixtures/defold-1.14.0/coroutine_doc.json +152 -0
- package/fixtures/defold-1.14.0/crash_doc.json +483 -0
- package/fixtures/defold-1.14.0/debug_doc.json +411 -0
- package/fixtures/defold-1.14.0/editor_doc.json +6320 -0
- package/fixtures/defold-1.14.0/editor_http_doc.json +476 -0
- package/fixtures/defold-1.14.0/editor_image_doc.json +129 -0
- package/fixtures/defold-1.14.0/editor_json_doc.json +81 -0
- package/fixtures/defold-1.14.0/editor_localization_doc.json +139 -0
- package/fixtures/defold-1.14.0/editor_pprint_doc.json +37 -0
- package/fixtures/defold-1.14.0/editor_tilemap_tiles_doc.json +292 -0
- package/fixtures/defold-1.14.0/editor_zip_doc.json +237 -0
- package/fixtures/defold-1.14.0/editor_zlib_doc.json +49 -0
- package/fixtures/defold-1.14.0/factory_doc.json +206 -0
- package/fixtures/defold-1.14.0/font_doc.json +230 -0
- package/fixtures/defold-1.14.0/globals_doc.json +64 -0
- package/fixtures/defold-1.14.0/go-instance-functions.json +106 -0
- package/fixtures/defold-1.14.0/go_doc.json +1789 -0
- package/fixtures/defold-1.14.0/graphics_doc.json +1257 -0
- package/fixtures/defold-1.14.0/gui_doc.json +4735 -0
- package/fixtures/defold-1.14.0/html5_doc.json +65 -0
- package/fixtures/defold-1.14.0/http_doc.json +174 -0
- package/fixtures/defold-1.14.0/image_doc.json +298 -0
- package/fixtures/defold-1.14.0/import-manifest.json +10260 -0
- package/fixtures/defold-1.14.0/io_doc.json +400 -0
- package/fixtures/defold-1.14.0/json_doc.json +140 -0
- package/fixtures/defold-1.14.0/label_doc.json +427 -0
- package/fixtures/defold-1.14.0/liveupdate_doc.json +221 -0
- package/fixtures/defold-1.14.0/material_doc.json +773 -0
- package/fixtures/defold-1.14.0/math_doc.json +703 -0
- package/fixtures/defold-1.14.0/model_doc.json +472 -0
- package/fixtures/defold-1.14.0/msg_doc.json +169 -0
- package/fixtures/defold-1.14.0/os_doc.json +269 -0
- package/fixtures/defold-1.14.0/package_doc.json +140 -0
- package/fixtures/defold-1.14.0/particlefx_doc.json +249 -0
- package/fixtures/defold-1.14.0/physics_doc.json +1624 -0
- package/fixtures/defold-1.14.0/profiler_doc.json +348 -0
- package/fixtures/defold-1.14.0/render_doc.json +1628 -0
- package/fixtures/defold-1.14.0/resource_doc.json +1539 -0
- package/fixtures/defold-1.14.0/socket_doc.json +2335 -0
- package/fixtures/defold-1.14.0/sound_doc.json +673 -0
- package/fixtures/defold-1.14.0/sprite_doc.json +364 -0
- package/fixtures/defold-1.14.0/string_doc.json +413 -0
- package/fixtures/defold-1.14.0/sys_doc.json +1347 -0
- package/fixtures/defold-1.14.0/table_doc.json +167 -0
- package/fixtures/defold-1.14.0/tilemap_doc.json +369 -0
- package/fixtures/defold-1.14.0/timer_doc.json +214 -0
- package/fixtures/defold-1.14.0/types_doc.json +213 -0
- package/fixtures/defold-1.14.0/vmath_doc.json +2056 -0
- package/fixtures/defold-1.14.0/window_doc.json +426 -0
- package/fixtures/defold-1.14.0/zlib_doc.json +71 -0
- package/generated/b2d.d.ts +39 -39
- package/generated/b2d_body.d.ts +11 -11
- package/generated/b2d_chain.d.ts +3 -3
- package/generated/b2d_fixture.d.ts +5 -5
- package/generated/b2d_joint.d.ts +29 -29
- package/generated/b2d_shape.d.ts +13 -13
- package/generated/b2d_world.d.ts +15 -15
- package/generated/buffer.d.ts +5 -6
- package/generated/bullet3d.d.ts +6 -6
- package/generated/bullet3d_collision_object.d.ts +9 -9
- package/generated/bullet3d_constraint.d.ts +78 -78
- package/generated/bullet3d_rigid_body.d.ts +3 -3
- package/generated/bullet3d_shape.d.ts +11 -11
- package/generated/bullet3d_world.d.ts +20 -20
- package/generated/camera.d.ts +4 -4
- package/generated/collectionfactory.d.ts +2 -3
- package/generated/collectionproxy.d.ts +5 -5
- package/generated/compute.d.ts +5 -5
- package/generated/crash.d.ts +7 -7
- package/generated/editor-vm/http.d.ts +13 -13
- package/generated/editor-vm/image.d.ts +4 -4
- package/generated/editor-vm/json.d.ts +1 -1
- package/generated/editor-vm/tilemap_tiles.d.ts +9 -9
- package/generated/editor-vm/zip.d.ts +4 -4
- package/generated/editor.d.ts +183 -183
- package/generated/factory.d.ts +2 -3
- package/generated/font.d.ts +4 -4
- package/generated/go.d.ts +10 -12
- package/generated/graphics.d.ts +23 -26
- package/generated/gui.d.ts +44 -58
- package/generated/http.d.ts +2 -2
- package/generated/image.d.ts +12 -12
- package/generated/json.d.ts +4 -4
- package/generated/label.d.ts +5 -5
- package/generated/liveupdate.d.ts +3 -3
- package/generated/material.d.ts +48 -48
- package/generated/model.d.ts +46 -14
- package/generated/particlefx.d.ts +5 -5
- package/generated/physics.d.ts +19 -19
- package/generated/profiler.d.ts +3 -5
- package/generated/render-script-modules/b2d.d.ts +39 -39
- package/generated/render-script-modules/bullet3d.d.ts +5 -5
- package/generated/render-script-modules/collectionfactory.d.ts +1 -2
- package/generated/render-script-modules/collectionproxy.d.ts +3 -3
- package/generated/render-script-modules/factory.d.ts +1 -2
- package/generated/render-script-modules/go.d.ts +8 -10
- package/generated/render-script-modules/label.d.ts +2 -2
- package/generated/render-script-modules/model.d.ts +43 -11
- package/generated/render-script-modules/particlefx.d.ts +3 -3
- package/generated/render-script-modules/physics.d.ts +12 -12
- package/generated/render-script-modules/resource.d.ts +52 -53
- package/generated/render-script-modules/sound.d.ts +4 -4
- package/generated/render-script-modules/sprite.d.ts +2 -2
- package/generated/render-script-modules/tilemap.d.ts +2 -2
- package/generated/render.d.ts +44 -45
- package/generated/resource.d.ts +58 -59
- package/generated/socket.d.ts +18 -23
- package/generated/sound.d.ts +6 -6
- package/generated/sprite.d.ts +3 -3
- package/generated/sys.d.ts +20 -21
- package/generated/tilemap.d.ts +3 -3
- package/generated/timer.d.ts +3 -3
- package/generated/versions/defold-1.12.4/b2d.d.ts +2 -2
- package/generated/versions/defold-1.12.4/b2d_body.d.ts +2 -2
- package/generated/versions/defold-1.12.4/go.d.ts +2 -2
- package/generated/versions/defold-1.12.4/graphics.d.ts +1 -1
- package/generated/versions/defold-1.12.4/gui.d.ts +18 -19
- package/generated/versions/defold-1.12.4/label.d.ts +1 -1
- package/generated/versions/defold-1.12.4/model.d.ts +42 -10
- package/generated/versions/defold-1.12.4/particlefx.d.ts +1 -1
- package/generated/versions/defold-1.12.4/physics.d.ts +1 -1
- package/generated/versions/defold-1.12.4/render.d.ts +5 -5
- package/generated/versions/defold-1.12.4/resource.d.ts +8 -8
- package/generated/versions/defold-1.12.4/socket.d.ts +12 -12
- package/generated/versions/defold-1.12.4/sound.d.ts +1 -1
- package/generated/versions/defold-1.12.4/sprite.d.ts +1 -1
- package/generated/versions/defold-1.12.4/sys.d.ts +2 -2
- package/generated/versions/defold-1.12.4/tilemap.d.ts +1 -1
- package/generated/versions/defold-1.12.4/window.d.ts +3 -4
- package/generated/versions/defold-1.13.0/b2d.d.ts +2 -2
- package/generated/versions/defold-1.13.0/b2d_body.d.ts +2 -2
- package/generated/versions/defold-1.13.0/b2d_chain.d.ts +1 -1
- package/generated/versions/defold-1.13.0/b2d_joint.d.ts +1 -1
- package/generated/versions/defold-1.13.0/b2d_shape.d.ts +1 -1
- package/generated/versions/defold-1.13.0/camera.d.ts +1 -1
- package/generated/versions/defold-1.13.0/go.d.ts +2 -2
- package/generated/versions/defold-1.13.0/graphics.d.ts +1 -1
- package/generated/versions/defold-1.13.0/gui.d.ts +18 -19
- package/generated/versions/defold-1.13.0/label.d.ts +1 -1
- package/generated/versions/defold-1.13.0/model.d.ts +42 -10
- package/generated/versions/defold-1.13.0/particlefx.d.ts +1 -1
- package/generated/versions/defold-1.13.0/physics.d.ts +1 -1
- package/generated/versions/defold-1.13.0/render.d.ts +5 -5
- package/generated/versions/defold-1.13.0/resource.d.ts +8 -8
- package/generated/versions/defold-1.13.0/socket.d.ts +12 -12
- package/generated/versions/defold-1.13.0/sound.d.ts +1 -1
- package/generated/versions/defold-1.13.0/sprite.d.ts +1 -1
- package/generated/versions/defold-1.13.0/sys.d.ts +2 -2
- package/generated/versions/defold-1.13.0/tilemap.d.ts +1 -1
- package/generated/versions/defold-1.13.0/window.d.ts +3 -4
- package/generated/versions/defold-1.13.1/b2d.d.ts +2 -2
- package/generated/versions/defold-1.13.1/b2d_body.d.ts +2 -2
- package/generated/versions/defold-1.13.1/b2d_chain.d.ts +1 -1
- package/generated/versions/defold-1.13.1/b2d_joint.d.ts +1 -1
- package/generated/versions/defold-1.13.1/b2d_shape.d.ts +1 -1
- package/generated/versions/defold-1.13.1/camera.d.ts +1 -1
- package/generated/versions/defold-1.13.1/go.d.ts +2 -2
- package/generated/versions/defold-1.13.1/graphics.d.ts +1 -1
- package/generated/versions/defold-1.13.1/gui.d.ts +18 -19
- package/generated/versions/defold-1.13.1/label.d.ts +1 -1
- package/generated/versions/defold-1.13.1/model.d.ts +42 -10
- package/generated/versions/defold-1.13.1/particlefx.d.ts +1 -1
- package/generated/versions/defold-1.13.1/physics.d.ts +1 -1
- package/generated/versions/defold-1.13.1/render.d.ts +5 -5
- package/generated/versions/defold-1.13.1/resource.d.ts +8 -8
- package/generated/versions/defold-1.13.1/socket.d.ts +12 -12
- package/generated/versions/defold-1.13.1/sound.d.ts +1 -1
- package/generated/versions/defold-1.13.1/sprite.d.ts +1 -1
- package/generated/versions/defold-1.13.1/sys.d.ts +2 -2
- package/generated/versions/defold-1.13.1/tilemap.d.ts +1 -1
- package/generated/versions/defold-1.13.1/window.d.ts +3 -4
- package/generated/versions/defold-1.13.2/b2d.d.ts +39 -39
- package/generated/versions/defold-1.13.2/b2d_body.d.ts +11 -11
- package/generated/versions/defold-1.13.2/b2d_chain.d.ts +3 -3
- package/generated/versions/defold-1.13.2/b2d_fixture.d.ts +5 -5
- package/generated/versions/defold-1.13.2/b2d_joint.d.ts +29 -29
- package/generated/versions/defold-1.13.2/b2d_shape.d.ts +13 -13
- package/generated/versions/defold-1.13.2/b2d_world.d.ts +15 -15
- package/generated/versions/defold-1.13.2/buffer.d.ts +5 -6
- package/generated/versions/defold-1.13.2/bullet3d.d.ts +6 -6
- package/generated/versions/defold-1.13.2/bullet3d_collision_object.d.ts +9 -9
- package/generated/versions/defold-1.13.2/bullet3d_constraint.d.ts +78 -78
- package/generated/versions/defold-1.13.2/bullet3d_rigid_body.d.ts +3 -3
- package/generated/versions/defold-1.13.2/bullet3d_shape.d.ts +11 -11
- package/generated/versions/defold-1.13.2/bullet3d_world.d.ts +20 -20
- package/generated/versions/defold-1.13.2/camera.d.ts +4 -4
- package/generated/versions/defold-1.13.2/collectionfactory.d.ts +2 -3
- package/generated/versions/defold-1.13.2/collectionproxy.d.ts +5 -5
- package/generated/versions/defold-1.13.2/compute.d.ts +5 -5
- package/generated/versions/defold-1.13.2/crash.d.ts +7 -7
- package/generated/versions/defold-1.13.2/editor-vm/http.d.ts +13 -13
- package/generated/versions/defold-1.13.2/editor-vm/image.d.ts +4 -4
- package/generated/versions/defold-1.13.2/editor-vm/json.d.ts +1 -1
- package/generated/versions/defold-1.13.2/editor-vm/tilemap_tiles.d.ts +9 -9
- package/generated/versions/defold-1.13.2/editor-vm/zip.d.ts +4 -4
- package/generated/versions/defold-1.13.2/editor.d.ts +183 -183
- package/generated/versions/defold-1.13.2/factory.d.ts +2 -3
- package/generated/versions/defold-1.13.2/font.d.ts +4 -4
- package/generated/versions/defold-1.13.2/go.d.ts +10 -12
- package/generated/versions/defold-1.13.2/graphics.d.ts +22 -25
- package/generated/versions/defold-1.13.2/gui.d.ts +44 -58
- package/generated/versions/defold-1.13.2/http.d.ts +2 -2
- package/generated/versions/defold-1.13.2/image.d.ts +12 -12
- package/generated/versions/defold-1.13.2/json.d.ts +4 -4
- package/generated/versions/defold-1.13.2/label.d.ts +5 -5
- package/generated/versions/defold-1.13.2/liveupdate.d.ts +3 -3
- package/generated/versions/defold-1.13.2/material.d.ts +48 -48
- package/generated/versions/defold-1.13.2/model.d.ts +46 -14
- package/generated/versions/defold-1.13.2/particlefx.d.ts +5 -5
- package/generated/versions/defold-1.13.2/physics.d.ts +19 -19
- package/generated/versions/defold-1.13.2/profiler.d.ts +3 -5
- package/generated/versions/defold-1.13.2/render.d.ts +43 -44
- package/generated/versions/defold-1.13.2/resource.d.ts +58 -59
- package/generated/versions/defold-1.13.2/socket.d.ts +18 -23
- package/generated/versions/defold-1.13.2/sound.d.ts +6 -6
- package/generated/versions/defold-1.13.2/sprite.d.ts +3 -3
- package/generated/versions/defold-1.13.2/sys.d.ts +20 -21
- package/generated/versions/defold-1.13.2/tilemap.d.ts +3 -3
- package/generated/versions/defold-1.13.2/timer.d.ts +3 -3
- package/generated/versions/defold-1.13.2/vmath.d.ts +0 -1
- package/generated/versions/defold-1.13.2/window.d.ts +8 -10
- package/generated/vmath.d.ts +0 -1
- package/generated/window.d.ts +8 -10
- package/identity-vocabulary.json +41 -34
- package/package.json +13 -5
- package/scripts/cli-runtime.ts +18 -0
- package/scripts/example-store-io.ts +2 -2
- package/scripts/extension-goldens.ts +9 -5
- package/scripts/generate-api-availability.ts +10 -4
- package/scripts/generate-api-signatures.ts +1 -1
- package/scripts/import-defold-release.ts +1 -1
- package/scripts/regen.ts +35 -9
- package/scripts/shared-handle-methods.ts +3 -2
- package/scripts/signature-store-fs.ts +37 -17
- package/scripts/sync-api-docs.ts +127 -20
- package/src/api-doc.ts +19 -4
- package/src/api-identity.ts +32 -1
- package/src/component-properties.d.ts +8 -8
- package/src/core-types.ts +29 -13
- package/src/doc-corrections.ts +9 -0
- package/src/emit-dts.ts +770 -214
- package/src/engine-type-name.ts +33 -0
- package/src/go-overloads.d.ts +10 -10
- package/src/gui-overloads.d.ts +11 -11
- package/src/index-slot-classifications.ts +75 -9
- package/src/index.ts +4 -1
- package/src/lifecycle.ts +2 -2
- package/src/publish-dts.ts +16 -0
- package/src/script-api.ts +36 -38
- package/src/socket-types.d.ts +3 -3
- package/src/library-index-slot-classifications.ts +0 -332
|
@@ -10,15 +10,19 @@ import type { ModuleManifestEntry } from "./regen";
|
|
|
10
10
|
// break every installed `resolve`.
|
|
11
11
|
export const EXTENSION_GOLDENS_DIR = "extension-goldens";
|
|
12
12
|
|
|
13
|
-
const PACKAGE_ROOT = resolve(import.meta.
|
|
13
|
+
const PACKAGE_ROOT = resolve(import.meta.dirname, "..");
|
|
14
14
|
const EXTENSION_GOLDEN_NAMESPACES = ["iac", "iap", "push", "webview"] as const;
|
|
15
15
|
|
|
16
|
+
// Each golden's doc is the conversion of the extension's `.script_api` at its
|
|
17
|
+
// `packages/library-types/defold-extensions.json` pin, the same JSON the
|
|
18
|
+
// Libraries pages render, so a golden carries the namespace's constants, optional
|
|
19
|
+
// slots and callback arguments exactly as `resolve` would emit them for a project.
|
|
20
|
+
const EXTENSION_DOCS_DIR = resolve(PACKAGE_ROOT, "../library-types/defold-extensions/api-doc");
|
|
21
|
+
|
|
16
22
|
export const EXTENSION_GOLDEN_MANIFEST: readonly ModuleManifestEntry[] =
|
|
17
23
|
EXTENSION_GOLDEN_NAMESPACES.map((namespace) => ({
|
|
18
24
|
namespace,
|
|
19
|
-
doc: JSON.parse(
|
|
20
|
-
readFileSync(resolve(PACKAGE_ROOT, "fixtures", `${namespace}_doc.json`), "utf8"),
|
|
21
|
-
),
|
|
25
|
+
doc: JSON.parse(readFileSync(resolve(EXTENSION_DOCS_DIR, `${namespace}.json`), "utf8")),
|
|
22
26
|
outFile: `${namespace}.d.ts`,
|
|
23
|
-
indexBaseSource: { pages: [] },
|
|
27
|
+
indexBaseSource: { pages: [], classifications: new Map() },
|
|
24
28
|
}));
|
|
@@ -30,7 +30,7 @@ import { splitTopLevel } from "../src/luals-type-expr";
|
|
|
30
30
|
import { type ApiTarget, loadApiTargets, loadTargetModules } from "./regen";
|
|
31
31
|
import { compareVersions, versionOf } from "./target-version";
|
|
32
32
|
|
|
33
|
-
const PACKAGE_ROOT = resolve(import.meta.
|
|
33
|
+
const PACKAGE_ROOT = resolve(import.meta.dirname, "..");
|
|
34
34
|
const MIGRATIONS_PATH = resolve(PACKAGE_ROOT, "api-migrations.json");
|
|
35
35
|
const AVAILABILITY_PATH = resolve(PACKAGE_ROOT, "api-availability.json");
|
|
36
36
|
|
|
@@ -78,8 +78,12 @@ export function identityCorrections(): IdentityCorrections {
|
|
|
78
78
|
key,
|
|
79
79
|
{
|
|
80
80
|
pins: correctionPins(correction),
|
|
81
|
-
...(correction.
|
|
82
|
-
|
|
81
|
+
...(correction.ts !== undefined
|
|
82
|
+
? { replaces: union(correction.ts) }
|
|
83
|
+
: {
|
|
84
|
+
...(correction.adds === undefined ? {} : { adds: union(correction.adds) }),
|
|
85
|
+
...(correction.removes === undefined ? {} : { removes: [...correction.removes] }),
|
|
86
|
+
}),
|
|
83
87
|
},
|
|
84
88
|
]),
|
|
85
89
|
),
|
|
@@ -98,7 +102,9 @@ export function identityCorrections(): IdentityCorrections {
|
|
|
98
102
|
]),
|
|
99
103
|
),
|
|
100
104
|
constantFamilies: Object.fromEntries(
|
|
101
|
-
CONSTANT_UNION_ALIASES.
|
|
105
|
+
CONSTANT_UNION_ALIASES.flatMap((alias) =>
|
|
106
|
+
"name" in alias ? [[`${alias.home}.${alias.name}`, alias.members] as const] : [],
|
|
107
|
+
),
|
|
102
108
|
),
|
|
103
109
|
};
|
|
104
110
|
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import { loadSignatureFile } from "./signature-store-fs";
|
|
15
15
|
import { versionOf } from "./target-version";
|
|
16
16
|
|
|
17
|
-
const PACKAGE_ROOT = resolve(import.meta.
|
|
17
|
+
const PACKAGE_ROOT = resolve(import.meta.dirname, "..");
|
|
18
18
|
const SIGNATURES_PATH = resolve(PACKAGE_ROOT, "api-signatures.json");
|
|
19
19
|
|
|
20
20
|
export interface SignaturesArtifact {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
|
|
18
18
|
const EXACT_VERSION = /^\d+\.\d+\.\d+$/;
|
|
19
19
|
const DECLARED_NAME_KINDS = new Set(["CONSTANT", "ENUM", "STRUCT", "TYPEDEF", "CLASS"]);
|
|
20
|
-
const PACKAGE_ROOT = resolve(import.meta.
|
|
20
|
+
const PACKAGE_ROOT = resolve(import.meta.dirname, "..");
|
|
21
21
|
|
|
22
22
|
// Editor-scripting namespaces are mapped, but not by `api-targets.json`: they
|
|
23
23
|
// emit through `EDITOR_MODULE_MANIFEST` rather than the runtime module set the
|
package/scripts/regen.ts
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
formatFieldCorrectionGaps,
|
|
31
31
|
} from "../src/field-correction-coverage";
|
|
32
32
|
import type { IndexBaseSource } from "../src/index-slot-classifications";
|
|
33
|
-
import { wrapAsAmbientGlobal, wrapAsModule } from "../src/publish-dts";
|
|
33
|
+
import { wrapAsAmbientGlobal, wrapAsGlobalTableModule, wrapAsModule } from "../src/publish-dts";
|
|
34
34
|
import type { UrlParameterTable } from "../src/url-parameters";
|
|
35
35
|
import {
|
|
36
36
|
type DocSourceProvenance,
|
|
@@ -87,8 +87,8 @@ export interface ApiTarget {
|
|
|
87
87
|
readonly luaStdlib?: readonly { readonly namespace: string; readonly fixture: string }[];
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
const REGISTRY_PATH = resolve(import.meta.
|
|
91
|
-
const PACKAGE_ROOT = resolve(import.meta.
|
|
90
|
+
const REGISTRY_PATH = resolve(import.meta.dirname, "..", "api-targets.json");
|
|
91
|
+
const PACKAGE_ROOT = resolve(import.meta.dirname, "..");
|
|
92
92
|
|
|
93
93
|
export function loadApiTargets(
|
|
94
94
|
registryPath: string = REGISTRY_PATH,
|
|
@@ -176,6 +176,9 @@ export interface ModuleManifestEntry {
|
|
|
176
176
|
// The classification map this entry's index notes read; absent means the
|
|
177
177
|
// engine map. A library or extension declaration names its page keys.
|
|
178
178
|
readonly indexBaseSource?: IndexBaseSource;
|
|
179
|
+
// `false` for an extension declaration, which leaves the constant-union
|
|
180
|
+
// aliases of the namespace it shares to the engine module; absent means `true`.
|
|
181
|
+
readonly ownsConstantUnionAliases?: boolean;
|
|
179
182
|
}
|
|
180
183
|
|
|
181
184
|
export interface ResolveTargetOptions {
|
|
@@ -752,10 +755,10 @@ export function assertCommittedFieldCorrectionCoverage(
|
|
|
752
755
|
return targets.length;
|
|
753
756
|
}
|
|
754
757
|
|
|
755
|
-
|
|
758
|
+
function emitModuleBody(
|
|
756
759
|
entry: ModuleManifestEntry,
|
|
757
760
|
options?: GenerateOptions,
|
|
758
|
-
):
|
|
761
|
+
): { namespace: string; emitted: string; importsFrom: string; dropped: string[] } {
|
|
759
762
|
const {
|
|
760
763
|
module,
|
|
761
764
|
knownConstantFqns,
|
|
@@ -780,14 +783,34 @@ export function generateModuleDeclaration(
|
|
|
780
783
|
...(typeLeaves ? { typeLeaves } : {}),
|
|
781
784
|
...(declaredTypes ? { declaredTypes } : {}),
|
|
782
785
|
...(entry.indexBaseSource ? { indexBaseSource: entry.indexBaseSource } : {}),
|
|
786
|
+
...(entry.ownsConstantUnionAliases !== undefined
|
|
787
|
+
? { ownsConstantUnionAliases: entry.ownsConstantUnionAliases }
|
|
788
|
+
: {}),
|
|
783
789
|
});
|
|
784
790
|
const importsFrom = entry.importsFrom ?? "../src/core-types";
|
|
791
|
+
return { namespace: module.namespace, emitted, importsFrom, dropped };
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
export function generateModuleDeclaration(
|
|
795
|
+
entry: ModuleManifestEntry,
|
|
796
|
+
options?: GenerateOptions,
|
|
797
|
+
): GenerateResult {
|
|
798
|
+
const { namespace, emitted, importsFrom, dropped } = emitModuleBody(entry, options);
|
|
785
799
|
const contents = entry.moduleId
|
|
786
|
-
? wrapAsModule({ namespace
|
|
787
|
-
: wrapAsAmbientGlobal({ namespace
|
|
800
|
+
? wrapAsModule({ namespace, emitted, importsFrom, moduleId: entry.moduleId })
|
|
801
|
+
: wrapAsAmbientGlobal({ namespace, emitted, importsFrom });
|
|
788
802
|
return { contents, dropped };
|
|
789
803
|
}
|
|
790
804
|
|
|
805
|
+
// A `.script_api` namespace as `resolve` writes it: a `@globalTable` module.
|
|
806
|
+
export function generateGlobalTableDeclaration(
|
|
807
|
+
entry: ModuleManifestEntry,
|
|
808
|
+
options?: GenerateOptions,
|
|
809
|
+
): GenerateResult {
|
|
810
|
+
const { namespace, emitted, importsFrom, dropped } = emitModuleBody(entry, options);
|
|
811
|
+
return { contents: wrapAsGlobalTableModule({ namespace, emitted, importsFrom }), dropped };
|
|
812
|
+
}
|
|
813
|
+
|
|
791
814
|
// The authoritative per-symbol signatures for a manifest entry, rendered through
|
|
792
815
|
// the same prepared module (skip filter + constant branding) as
|
|
793
816
|
// `generateModuleDeclaration`, so every signature corresponds to the committed
|
|
@@ -816,6 +839,9 @@ export function generateModuleSignatures(
|
|
|
816
839
|
...(nilRaisingSlots ? { nilRaisingSlots } : {}),
|
|
817
840
|
...(typeLeaves ? { typeLeaves } : {}),
|
|
818
841
|
...(declaredTypes ? { declaredTypes } : {}),
|
|
842
|
+
...(entry.ownsConstantUnionAliases !== undefined
|
|
843
|
+
? { ownsConstantUnionAliases: entry.ownsConstantUnionAliases }
|
|
844
|
+
: {}),
|
|
819
845
|
});
|
|
820
846
|
}
|
|
821
847
|
|
|
@@ -1325,7 +1351,7 @@ export async function regenerate(
|
|
|
1325
1351
|
// Imported here rather than at module scope: the vendored engine bindings are
|
|
1326
1352
|
// not published, and `resolve` loads this module from an installed package.
|
|
1327
1353
|
const { targetBindingOptions } = await import("./binding-pin");
|
|
1328
|
-
const generated = resolve(import.meta.
|
|
1354
|
+
const generated = resolve(import.meta.dirname, "..", "generated");
|
|
1329
1355
|
io.mkdir(resolve(generated, "editor-vm"));
|
|
1330
1356
|
const defaultBinding = targetBindingOptions(DEFAULT_TARGET);
|
|
1331
1357
|
for (const entry of MODULE_MANIFEST) {
|
|
@@ -1356,7 +1382,7 @@ export async function regenerate(
|
|
|
1356
1382
|
const goldens = resolve(PACKAGE_ROOT, EXTENSION_GOLDENS_DIR);
|
|
1357
1383
|
io.mkdir(goldens);
|
|
1358
1384
|
for (const entry of EXTENSION_GOLDEN_MANIFEST) {
|
|
1359
|
-
const { contents, dropped } =
|
|
1385
|
+
const { contents, dropped } = generateGlobalTableDeclaration(entry);
|
|
1360
1386
|
if (dropped.length > 0) {
|
|
1361
1387
|
io.log(`note: dropped skipped member(s) from ${entry.namespace}: ${dropped.join(", ")}`);
|
|
1362
1388
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SocketHandleReceiver } from "../src/core-types";
|
|
1
2
|
import type { ModuleManifestEntry } from "./regen";
|
|
2
3
|
|
|
3
4
|
// A method the engine shares across several handle classes where a release's
|
|
@@ -20,8 +21,8 @@ export const SHARED_HANDLE_METHODS: readonly SharedHandleMethod[] = (
|
|
|
20
21
|
).map((method) => ({
|
|
21
22
|
namespace: "socket",
|
|
22
23
|
method,
|
|
23
|
-
source: "client",
|
|
24
|
-
handles: ["master", "server"],
|
|
24
|
+
source: "client" satisfies SocketHandleReceiver,
|
|
25
|
+
handles: ["master", "server"] satisfies SocketHandleReceiver[],
|
|
25
26
|
evidence: TCP_ANY,
|
|
26
27
|
}));
|
|
27
28
|
|
|
@@ -5,28 +5,48 @@ import type { SignatureStore } from "../src/signature-store";
|
|
|
5
5
|
// Build-time only: lives under `scripts/` (never reachable from the shipped
|
|
6
6
|
// `src/index.ts` graph) so its `node:fs` import cannot leak into a consumer's
|
|
7
7
|
// typecheck. `src/signature-store.ts` stays pure for exactly that reason.
|
|
8
|
-
export const IO_SIGNATURES_PATH = resolve(import.meta.
|
|
9
|
-
export const STRING_SIGNATURES_PATH = resolve(
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export const IO_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "io.json");
|
|
9
|
+
export const STRING_SIGNATURES_PATH = resolve(
|
|
10
|
+
import.meta.dirname,
|
|
11
|
+
"..",
|
|
12
|
+
"signatures",
|
|
13
|
+
"string.json",
|
|
14
|
+
);
|
|
15
|
+
export const TABLE_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "table.json");
|
|
16
|
+
export const OS_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "os.json");
|
|
12
17
|
export const COROUTINE_SIGNATURES_PATH = resolve(
|
|
13
|
-
import.meta.
|
|
18
|
+
import.meta.dirname,
|
|
14
19
|
"..",
|
|
15
20
|
"signatures",
|
|
16
21
|
"coroutine.json",
|
|
17
22
|
);
|
|
18
|
-
export const MATH_SIGNATURES_PATH = resolve(import.meta.
|
|
19
|
-
export const BIT_SIGNATURES_PATH = resolve(import.meta.
|
|
20
|
-
export const DEBUG_SIGNATURES_PATH = resolve(import.meta.
|
|
21
|
-
export const PACKAGE_SIGNATURES_PATH = resolve(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
|
|
23
|
+
export const MATH_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "math.json");
|
|
24
|
+
export const BIT_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "bit.json");
|
|
25
|
+
export const DEBUG_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "debug.json");
|
|
26
|
+
export const PACKAGE_SIGNATURES_PATH = resolve(
|
|
27
|
+
import.meta.dirname,
|
|
28
|
+
"..",
|
|
29
|
+
"signatures",
|
|
30
|
+
"package.json",
|
|
31
|
+
);
|
|
32
|
+
export const BASE_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "base.json");
|
|
33
|
+
export const SOCKET_SIGNATURES_PATH = resolve(
|
|
34
|
+
import.meta.dirname,
|
|
35
|
+
"..",
|
|
36
|
+
"signatures",
|
|
37
|
+
"socket.json",
|
|
38
|
+
);
|
|
39
|
+
export const VMATH_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "vmath.json");
|
|
40
|
+
export const GO_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "go.json");
|
|
41
|
+
export const GUI_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "gui.json");
|
|
42
|
+
export const MSG_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "msg.json");
|
|
43
|
+
export const RENDER_SIGNATURES_PATH = resolve(
|
|
44
|
+
import.meta.dirname,
|
|
45
|
+
"..",
|
|
46
|
+
"signatures",
|
|
47
|
+
"render.json",
|
|
48
|
+
);
|
|
49
|
+
export const SYS_SIGNATURES_PATH = resolve(import.meta.dirname, "..", "signatures", "sys.json");
|
|
30
50
|
|
|
31
51
|
export function loadSignatureFile(path: string): SignatureStore {
|
|
32
52
|
let raw: string;
|
package/scripts/sync-api-docs.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, mkdtempSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { dirname, join, resolve } from "node:path";
|
|
4
|
+
import { inflateRawSync } from "node:zlib";
|
|
4
5
|
import { type ApiModule, parseDefoldApiDoc } from "../src/api-doc";
|
|
5
6
|
import { DEFOLD_TYPE_MAP } from "../src/core-types";
|
|
6
7
|
import { parseScriptApi } from "../src/script-api";
|
|
@@ -234,19 +235,13 @@ export const UPSTREAM_MAPPED_NAMESPACES: ReadonlySet<string> = new Set(
|
|
|
234
235
|
[...SYNC_MANIFEST, ...LUA_STDLIB_MANIFEST, ...EDITOR_MANIFEST].map((e) => e.namespace),
|
|
235
236
|
);
|
|
236
237
|
|
|
237
|
-
// Convert a raw `.script_api` YAML doc to the core ref-doc JSON string
|
|
238
|
-
//
|
|
239
|
-
// semantics core fixtures use.
|
|
238
|
+
// Convert a raw `.script_api` YAML doc to the core ref-doc JSON string the
|
|
239
|
+
// Libraries pages, the `script-api` lane and `resolve` all read. The result is
|
|
240
|
+
// byte-compared by the same drift semantics core fixtures use.
|
|
240
241
|
export function scriptApiToFixtureJson(text: string): string {
|
|
241
242
|
return JSON.stringify(parseScriptApi(text));
|
|
242
243
|
}
|
|
243
244
|
|
|
244
|
-
// The docs-only variant: the same ref-doc JSON with constants kept, for pages
|
|
245
|
-
// that render a module's full surface rather than feed the emitter.
|
|
246
|
-
export function scriptApiToDocsJson(text: string): string {
|
|
247
|
-
return JSON.stringify(parseScriptApi(text, { complete: true }));
|
|
248
|
-
}
|
|
249
|
-
|
|
250
245
|
// The types-api-coverage `What` checklist in vision.md lists every namespace as
|
|
251
246
|
// a backtick-quoted token on the "Concrete breadth checklist" line. Reading it
|
|
252
247
|
// here keeps SYNC_MANIFEST + UNMAPPED honest against the source of truth: the
|
|
@@ -278,21 +273,133 @@ export interface ZipAccessor {
|
|
|
278
273
|
entries(): string[];
|
|
279
274
|
}
|
|
280
275
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
276
|
+
const ZIP_LOCAL_HEADER_SIGNATURE = 0x04034b50;
|
|
277
|
+
const ZIP_CENTRAL_HEADER_SIGNATURE = 0x02014b50;
|
|
278
|
+
const ZIP_END_RECORD_SIGNATURE = 0x06054b50;
|
|
279
|
+
const ZIP_END_RECORD_SIZE = 22;
|
|
280
|
+
const ZIP_MAX_COMMENT_SIZE = 0xffff;
|
|
281
|
+
const ZIP_METHOD_STORED = 0;
|
|
282
|
+
const ZIP_METHOD_DEFLATE = 8;
|
|
283
|
+
const ZIP64_MARKER = 0xffffffff;
|
|
284
|
+
|
|
285
|
+
interface ZipDirectoryEntry {
|
|
286
|
+
readonly method: number;
|
|
287
|
+
readonly compressedSize: number;
|
|
288
|
+
readonly localHeaderOffset: number;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// The directory an end record names must run exactly up to that record.
|
|
292
|
+
function readCentralDirectory(
|
|
293
|
+
bytes: Buffer,
|
|
294
|
+
endRecord: number,
|
|
295
|
+
path: string,
|
|
296
|
+
): Map<string, ZipDirectoryEntry> | Error {
|
|
297
|
+
const count = bytes.readUInt16LE(endRecord + 10);
|
|
298
|
+
const directorySize = bytes.readUInt32LE(endRecord + 12);
|
|
299
|
+
const directoryOffset = bytes.readUInt32LE(endRecord + 16);
|
|
300
|
+
if (count === 0xffff || directoryOffset === ZIP64_MARKER) {
|
|
301
|
+
return new Error(`${path}: zip64 archives are not supported`);
|
|
302
|
+
}
|
|
303
|
+
const disagrees = new Error(
|
|
304
|
+
`${path}: central directory disagrees with its end-of-central-directory record`,
|
|
305
|
+
);
|
|
306
|
+
if (directoryOffset + directorySize !== endRecord) {
|
|
307
|
+
return disagrees;
|
|
308
|
+
}
|
|
309
|
+
const entries = new Map<string, ZipDirectoryEntry>();
|
|
310
|
+
let cursor = directoryOffset;
|
|
311
|
+
for (let index = 0; index < count; index++) {
|
|
312
|
+
if (cursor + 46 > endRecord) {
|
|
313
|
+
return disagrees;
|
|
314
|
+
}
|
|
315
|
+
if (bytes.readUInt32LE(cursor) !== ZIP_CENTRAL_HEADER_SIGNATURE) {
|
|
316
|
+
return new Error(`${path}: central directory entry ${index} has no header signature`);
|
|
317
|
+
}
|
|
318
|
+
const method = bytes.readUInt16LE(cursor + 10);
|
|
319
|
+
const compressedSize = bytes.readUInt32LE(cursor + 20);
|
|
320
|
+
const uncompressedSize = bytes.readUInt32LE(cursor + 24);
|
|
321
|
+
const nameLength = bytes.readUInt16LE(cursor + 28);
|
|
322
|
+
const extraLength = bytes.readUInt16LE(cursor + 30);
|
|
323
|
+
const commentLength = bytes.readUInt16LE(cursor + 32);
|
|
324
|
+
const localHeaderOffset = bytes.readUInt32LE(cursor + 42);
|
|
325
|
+
if (
|
|
326
|
+
compressedSize === ZIP64_MARKER ||
|
|
327
|
+
uncompressedSize === ZIP64_MARKER ||
|
|
328
|
+
localHeaderOffset === ZIP64_MARKER
|
|
329
|
+
) {
|
|
330
|
+
return new Error(`${path}: zip64 archives are not supported`);
|
|
331
|
+
}
|
|
332
|
+
const next = cursor + 46 + nameLength + extraLength + commentLength;
|
|
333
|
+
if (next > endRecord) {
|
|
334
|
+
return disagrees;
|
|
335
|
+
}
|
|
336
|
+
const name = bytes.toString("utf8", cursor + 46, cursor + 46 + nameLength);
|
|
337
|
+
entries.set(name, { method, compressedSize, localHeaderOffset });
|
|
338
|
+
cursor = next;
|
|
339
|
+
}
|
|
340
|
+
if (cursor !== endRecord) {
|
|
341
|
+
return disagrees;
|
|
285
342
|
}
|
|
286
|
-
|
|
343
|
+
return entries;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// Walks the central directory, which is the archive's own index: every entry
|
|
347
|
+
// an archiver listed, directory entries included, in archive order. Found from
|
|
348
|
+
// the end record, which sits in the last 22 bytes unless a comment follows it.
|
|
349
|
+
// A comment may itself contain an end record, so a candidate counts only when
|
|
350
|
+
// its own comment length reaches exactly to the end of the archive and it
|
|
351
|
+
// describes a central directory ending at it. When no candidate does, the
|
|
352
|
+
// nearest one's own defect is reported.
|
|
353
|
+
function readZipDirectory(bytes: Buffer, path: string): Map<string, ZipDirectoryEntry> {
|
|
354
|
+
const earliest = Math.max(0, bytes.length - ZIP_END_RECORD_SIZE - ZIP_MAX_COMMENT_SIZE);
|
|
355
|
+
let nearestDefect: Error | undefined;
|
|
356
|
+
for (let at = bytes.length - ZIP_END_RECORD_SIZE; at >= earliest; at--) {
|
|
357
|
+
if (
|
|
358
|
+
bytes.readUInt32LE(at) === ZIP_END_RECORD_SIGNATURE &&
|
|
359
|
+
at + ZIP_END_RECORD_SIZE + bytes.readUInt16LE(at + 20) === bytes.length
|
|
360
|
+
) {
|
|
361
|
+
const directory = readCentralDirectory(bytes, at, path);
|
|
362
|
+
if (!(directory instanceof Error)) {
|
|
363
|
+
return directory;
|
|
364
|
+
}
|
|
365
|
+
nearestDefect ??= directory;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
if (nearestDefect !== undefined) {
|
|
369
|
+
throw nearestDefect;
|
|
370
|
+
}
|
|
371
|
+
throw new Error(`${path}: no end-of-central-directory record, not a zip archive`);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Parses the archive itself rather than shelling out to `unzip`, which a stock
|
|
375
|
+
// Windows machine does not have: the CLI opens extension archives through this
|
|
376
|
+
// under Node and Bun on every OS.
|
|
377
|
+
export function readZip(path: string): ZipAccessor {
|
|
378
|
+
const bytes = readFileSync(path);
|
|
379
|
+
const entries = readZipDirectory(bytes, path);
|
|
287
380
|
return {
|
|
288
381
|
has: (name) => entries.has(name),
|
|
289
|
-
entries: () => [...entries],
|
|
382
|
+
entries: () => [...entries.keys()],
|
|
290
383
|
read: (name) => {
|
|
291
|
-
const
|
|
292
|
-
if (
|
|
293
|
-
throw new Error(`
|
|
384
|
+
const entry = entries.get(name);
|
|
385
|
+
if (entry === undefined) {
|
|
386
|
+
throw new Error(`no entry ${name} in ${path}`);
|
|
387
|
+
}
|
|
388
|
+
const { localHeaderOffset, compressedSize, method } = entry;
|
|
389
|
+
if (bytes.readUInt32LE(localHeaderOffset) !== ZIP_LOCAL_HEADER_SIGNATURE) {
|
|
390
|
+
throw new Error(`${path}: local header of ${name} has no signature`);
|
|
391
|
+
}
|
|
392
|
+
const nameLength = bytes.readUInt16LE(localHeaderOffset + 26);
|
|
393
|
+
const extraLength = bytes.readUInt16LE(localHeaderOffset + 28);
|
|
394
|
+
const start = localHeaderOffset + 30 + nameLength + extraLength;
|
|
395
|
+
const data = bytes.subarray(start, start + compressedSize);
|
|
396
|
+
if (method === ZIP_METHOD_STORED) {
|
|
397
|
+
return data.toString("utf8");
|
|
398
|
+
}
|
|
399
|
+
if (method === ZIP_METHOD_DEFLATE) {
|
|
400
|
+
return inflateRawSync(data).toString("utf8");
|
|
294
401
|
}
|
|
295
|
-
|
|
402
|
+
throw new Error(`${path}: entry ${name} uses unsupported compression method ${method}`);
|
|
296
403
|
},
|
|
297
404
|
};
|
|
298
405
|
}
|
|
@@ -434,7 +541,7 @@ export interface SyncOptions {
|
|
|
434
541
|
format?: (raw: string) => string;
|
|
435
542
|
}
|
|
436
543
|
|
|
437
|
-
const PACKAGE_ROOT = resolve(import.meta.
|
|
544
|
+
const PACKAGE_ROOT = resolve(import.meta.dirname, "..");
|
|
438
545
|
|
|
439
546
|
function canonicalJson(raw: string): string {
|
|
440
547
|
return JSON.stringify(JSON.parse(raw));
|
package/src/api-doc.ts
CHANGED
|
@@ -31,6 +31,8 @@ export interface ApiStruct {
|
|
|
31
31
|
brief: string;
|
|
32
32
|
description: string;
|
|
33
33
|
members: ApiStructMember[];
|
|
34
|
+
/** See {@link ApiTypedef.declaredIn}. */
|
|
35
|
+
declaredIn?: string;
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
/** One `STRUCT` member; upstream marks an optional one with a `name?` suffix. */
|
|
@@ -66,6 +68,8 @@ export interface ApiTypedef {
|
|
|
66
68
|
types?: string[];
|
|
67
69
|
/** The type text of each parent an interface-backed typedef extends. */
|
|
68
70
|
extends?: string[];
|
|
71
|
+
/** See {@link ApiFunction.generics}. */
|
|
72
|
+
generics?: string;
|
|
69
73
|
/**
|
|
70
74
|
* The type an engine ref-doc `TYPEDEF` aliases (`parameters[0].types`): a
|
|
71
75
|
* handle's `userdata`/`number`, or the arms of a union, literal or record alias.
|
|
@@ -73,6 +77,12 @@ export interface ApiTypedef {
|
|
|
73
77
|
aliasOf?: string[];
|
|
74
78
|
/** See {@link ApiFunction.global}. */
|
|
75
79
|
global?: true;
|
|
80
|
+
/**
|
|
81
|
+
* The namespace of the ref-doc module that declared this type, set when
|
|
82
|
+
* `routeTypeDeclarations` moves it to another module; the reference lists it
|
|
83
|
+
* on the declaring module's page. Absent on a type its own module declares.
|
|
84
|
+
*/
|
|
85
|
+
declaredIn?: string;
|
|
76
86
|
}
|
|
77
87
|
|
|
78
88
|
export interface ApiConstant {
|
|
@@ -81,8 +91,9 @@ export interface ApiConstant {
|
|
|
81
91
|
description: string;
|
|
82
92
|
/**
|
|
83
93
|
* Present when the constant is a member of an `ENUM` whose value type is
|
|
84
|
-
* `string` (`parameters[0].types`)
|
|
85
|
-
*
|
|
94
|
+
* `string` (`parameters[0].types`), or a `.script_api` scalar declared
|
|
95
|
+
* `type: string` (the converted `CONSTANT` element's `types`); absence means
|
|
96
|
+
* a number, as every pre-`ENUM` engine constant is.
|
|
86
97
|
*/
|
|
87
98
|
valueType?: "string";
|
|
88
99
|
/** Present when an `ENUM` member is typed `<ENUM>|nil`: some platforms leave it unset. */
|
|
@@ -102,8 +113,9 @@ export interface ApiFunction {
|
|
|
102
113
|
examples?: string;
|
|
103
114
|
/**
|
|
104
115
|
* A pre-rendered generic-parameter clause (`<T extends druid_widget>`) inserted
|
|
105
|
-
*
|
|
106
|
-
*
|
|
116
|
+
* right after the name at render time, before a function's `(` or an alias's
|
|
117
|
+
* `=`. Present only on library functions, type aliases and interfaces; engine
|
|
118
|
+
* ref-docs carry no `generics`, so it stays absent.
|
|
107
119
|
*/
|
|
108
120
|
generics?: string;
|
|
109
121
|
/**
|
|
@@ -355,6 +367,7 @@ function parseTypedef(element: Record<string, unknown>): ApiTypedef {
|
|
|
355
367
|
...(types.length > 0 ? { types } : {}),
|
|
356
368
|
...(parents.length > 0 ? { extends: parents } : {}),
|
|
357
369
|
...(aliasOf.length > 0 ? { aliasOf } : {}),
|
|
370
|
+
...(typeof element.generics === "string" ? { generics: element.generics } : {}),
|
|
358
371
|
...globalKey(element),
|
|
359
372
|
};
|
|
360
373
|
}
|
|
@@ -400,10 +413,12 @@ function parseProperty(element: Record<string, unknown>): ApiProperty {
|
|
|
400
413
|
}
|
|
401
414
|
|
|
402
415
|
function parseConstant(element: Record<string, unknown>): ApiConstant {
|
|
416
|
+
const types = parseStringArray(element.types);
|
|
403
417
|
return {
|
|
404
418
|
name: stringOr(element.name, ""),
|
|
405
419
|
brief: stringOr(element.brief, ""),
|
|
406
420
|
description: stringOr(element.description, ""),
|
|
421
|
+
...(types.length === 1 && types[0] === "string" ? { valueType: "string" as const } : {}),
|
|
407
422
|
...globalKey(element),
|
|
408
423
|
};
|
|
409
424
|
}
|
package/src/api-identity.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ApiFunction, ApiModule, ApiParameter } from "./api-doc";
|
|
2
2
|
import { DEFOLD_TYPE_MAP } from "./core-types";
|
|
3
3
|
import { pinMatches } from "./correction-pins";
|
|
4
|
+
import { engineTypeName } from "./engine-type-name";
|
|
4
5
|
import { splitTopLevel } from "./luals-type-expr";
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -32,7 +33,7 @@ export interface IdentityCorrections {
|
|
|
32
33
|
readonly parameterCorrections: Readonly<Record<string, IdentityCorrection>>;
|
|
33
34
|
/** Keyed by element. */
|
|
34
35
|
readonly returnCorrections: Readonly<Record<string, IdentityCorrection>>;
|
|
35
|
-
/** Constant-family aliases a correction may name (`
|
|
36
|
+
/** Constant-family aliases a correction may name (`graphics.BLEND_FACTOR`), with members. */
|
|
36
37
|
readonly constantFamilies: Readonly<Record<string, readonly string[]>>;
|
|
37
38
|
}
|
|
38
39
|
|
|
@@ -117,6 +118,32 @@ const NUMERIC_LITERAL = /^-?\d+(\.\d+)?$/;
|
|
|
117
118
|
const STRING_LITERAL = /^(".*"|'.*')$/;
|
|
118
119
|
// The TypeScript table types a correction writes.
|
|
119
120
|
const TS_TABLE = /^(Record|LuaMap|ReadonlyLuaMap|LuaTable)\b/;
|
|
121
|
+
// A subset of a constant union a correction writes, which is still that union's value.
|
|
122
|
+
const EXCLUDE = /^Exclude<([\w.]+),.*>$/;
|
|
123
|
+
|
|
124
|
+
const REFERENCE_TYPE_PATHS = new WeakMap<IdentityVocabulary, ReadonlyMap<string, string>>();
|
|
125
|
+
|
|
126
|
+
// The reference name a correction's TypeScript type path was derived from
|
|
127
|
+
// (`gui.Anchor` -> `gui.ANCHOR`), so renaming a type re-keys no identity.
|
|
128
|
+
function referenceTypePath(path: string, vocabulary: IdentityVocabulary): string {
|
|
129
|
+
let paths = REFERENCE_TYPE_PATHS.get(vocabulary);
|
|
130
|
+
if (paths === undefined) {
|
|
131
|
+
const built = new Map<string, string>();
|
|
132
|
+
for (const name of [
|
|
133
|
+
...Object.keys(vocabulary.enums),
|
|
134
|
+
...vocabulary.tables,
|
|
135
|
+
...Object.keys(vocabulary.aliases),
|
|
136
|
+
]) {
|
|
137
|
+
const dot = name.lastIndexOf(".");
|
|
138
|
+
if (dot < 0) continue;
|
|
139
|
+
const renamed = `${name.slice(0, dot + 1)}${engineTypeName(name.slice(dot + 1))}`;
|
|
140
|
+
if (renamed !== name) built.set(renamed, name);
|
|
141
|
+
}
|
|
142
|
+
paths = built;
|
|
143
|
+
REFERENCE_TYPE_PATHS.set(vocabulary, paths);
|
|
144
|
+
}
|
|
145
|
+
return paths.get(path) ?? path;
|
|
146
|
+
}
|
|
120
147
|
|
|
121
148
|
function canonicalLeaves(
|
|
122
149
|
token: string,
|
|
@@ -136,6 +163,10 @@ function canonicalLeaves(
|
|
|
136
163
|
if (trimmed.startsWith("typeof ")) {
|
|
137
164
|
return canonicalLeaves(trimmed.slice("typeof ".length), vocabulary, expanding);
|
|
138
165
|
}
|
|
166
|
+
const excluded = EXCLUDE.exec(trimmed);
|
|
167
|
+
if (excluded !== null) return canonicalLeaves(excluded[1] as string, vocabulary, expanding);
|
|
168
|
+
const reference = referenceTypePath(trimmed, vocabulary);
|
|
169
|
+
if (reference !== trimmed) return canonicalLeaves(reference, vocabulary, expanding);
|
|
139
170
|
if (trimmed === "nil" || trimmed === "undefined") return ["nil"];
|
|
140
171
|
// Every table shape — a bare or typed `table`, a list, an inline record, a
|
|
141
172
|
// struct, a built-in message payload — is one Lua table at runtime; its
|
|
@@ -8,7 +8,7 @@ import type { Hash, Vector3 } from "./core-types";
|
|
|
8
8
|
// evidence. A key the engine reads but never writes is `readonly`.
|
|
9
9
|
declare global {
|
|
10
10
|
namespace go {
|
|
11
|
-
interface
|
|
11
|
+
interface Properties {
|
|
12
12
|
/** The position's x component. `gameobject.cpp:GetProperty` reads one float. */
|
|
13
13
|
"position.x": number;
|
|
14
14
|
/** The position's y component. `gameobject.cpp:GetProperty` reads one float. */
|
|
@@ -45,7 +45,7 @@ declare global {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
namespace label {
|
|
48
|
-
interface
|
|
48
|
+
interface Properties {
|
|
49
49
|
/** The scale's x component. `comp_label.cpp` and `comp_private.cpp` read and write one float. */
|
|
50
50
|
"scale.x": number;
|
|
51
51
|
/** The scale's y component. `comp_label.cpp` and `comp_private.cpp` read and write one float. */
|
|
@@ -100,7 +100,7 @@ declare global {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
namespace sprite {
|
|
103
|
-
interface
|
|
103
|
+
interface Properties {
|
|
104
104
|
/** The scale's x component. `comp_sprite.cpp` and `comp_private.cpp` read and write one float. */
|
|
105
105
|
"scale.x": number;
|
|
106
106
|
/** The scale's y component. `comp_sprite.cpp` and `comp_private.cpp` read and write one float. */
|
|
@@ -146,7 +146,7 @@ declare global {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
namespace model {
|
|
149
|
-
interface
|
|
149
|
+
interface Properties {
|
|
150
150
|
/**
|
|
151
151
|
* The material resource the model renders with.
|
|
152
152
|
* `comp_model.cpp:CompModelGetProperty` and `CompModelSetProperty` read
|
|
@@ -162,7 +162,7 @@ declare global {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
namespace physics {
|
|
165
|
-
interface
|
|
165
|
+
interface Properties {
|
|
166
166
|
/**
|
|
167
167
|
* Whether the body runs continuous collision detection as a fast-moving
|
|
168
168
|
* bullet. Box2D only: `comp_collision_object_box2d.cpp` reads and writes
|
|
@@ -176,7 +176,7 @@ declare global {
|
|
|
176
176
|
/**
|
|
177
177
|
* Factory component properties. Upstream's factory reference declares none.
|
|
178
178
|
*/
|
|
179
|
-
interface
|
|
179
|
+
interface Properties {
|
|
180
180
|
/**
|
|
181
181
|
* The path hash of the prototype the factory spawns. Read-only:
|
|
182
182
|
* `comp_factory.cpp:CompFactoryGetProperty` reads it and the component
|
|
@@ -191,7 +191,7 @@ declare global {
|
|
|
191
191
|
* Collection factory component properties. Upstream's collectionfactory
|
|
192
192
|
* reference declares none.
|
|
193
193
|
*/
|
|
194
|
-
interface
|
|
194
|
+
interface Properties {
|
|
195
195
|
/**
|
|
196
196
|
* The path hash of the collection prototype the factory spawns.
|
|
197
197
|
* Read-only: `comp_collection_factory.cpp:CompCollectionFactoryGetProperty`
|
|
@@ -207,7 +207,7 @@ declare global {
|
|
|
207
207
|
* `CompMeshSetProperty` handle.
|
|
208
208
|
*/
|
|
209
209
|
namespace mesh {
|
|
210
|
-
interface
|
|
210
|
+
interface Properties {
|
|
211
211
|
/**
|
|
212
212
|
* The buffer resource holding the mesh's vertex data.
|
|
213
213
|
* `resource.get_buffer` and `resource.set_buffer` read it with
|