@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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Reference names the rule cannot split into words: the reference writes these
|
|
2
|
+
// as one run of capitals, or runs a number into a word (Bullet spells the joint
|
|
3
|
+
// `btGeneric6DofConstraint`).
|
|
4
|
+
export const ENGINE_TYPE_NAME_OVERRIDES: ReadonlyMap<string, string> = new Map([
|
|
5
|
+
["LIVEUPDATE", "LiveUpdate"],
|
|
6
|
+
["PIEBOUNDS", "PieBounds"],
|
|
7
|
+
["SYSFIELD", "SysField"],
|
|
8
|
+
["USERFIELD", "UserField"],
|
|
9
|
+
["generic_6dof_params", "Generic6DofParams"],
|
|
10
|
+
["generic_6dof_spring_params", "Generic6DofSpringParams"],
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The PascalCase TypeScript name of a reference type leaf (`EASING` ->
|
|
15
|
+
* `Easing`, `sys_info` -> `SysInfo`, `b2Body` -> `B2Body`). A word written in
|
|
16
|
+
* one case is capitalized; a mixed-case word keeps its inner capitals.
|
|
17
|
+
*/
|
|
18
|
+
export function engineTypeName(
|
|
19
|
+
referenceLeaf: string,
|
|
20
|
+
overrides: ReadonlyMap<string, string> = ENGINE_TYPE_NAME_OVERRIDES,
|
|
21
|
+
): string {
|
|
22
|
+
const override = overrides.get(referenceLeaf);
|
|
23
|
+
if (override !== undefined) return override;
|
|
24
|
+
return referenceLeaf
|
|
25
|
+
.split("_")
|
|
26
|
+
.filter((part) => part.length > 0)
|
|
27
|
+
.map((part) =>
|
|
28
|
+
part === part.toUpperCase() || part === part.toLowerCase()
|
|
29
|
+
? part.charAt(0).toUpperCase() + part.slice(1).toLowerCase()
|
|
30
|
+
: part.charAt(0).toUpperCase() + part.slice(1),
|
|
31
|
+
)
|
|
32
|
+
.join("");
|
|
33
|
+
}
|
package/src/go-overloads.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ declare global {
|
|
|
51
51
|
* const position = go.get("#sprite", "position");
|
|
52
52
|
* // Name the target component to read its catalogued property type. The
|
|
53
53
|
* // empty call applies the type argument, then the inner call infers the key:
|
|
54
|
-
* const animation = go.get<sprite.
|
|
54
|
+
* const animation = go.get<sprite.Properties>()("#sprite", "animation"); // Hash
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
57
|
function get<P>(): <K extends keyof P>(
|
|
@@ -59,15 +59,15 @@ declare global {
|
|
|
59
59
|
property: K,
|
|
60
60
|
...options: [] | [GoPropertyOptions]
|
|
61
61
|
) => P[K];
|
|
62
|
-
function get<K extends keyof go.
|
|
62
|
+
function get<K extends keyof go.Properties>(
|
|
63
63
|
url: SceneAddress | Hash | Url,
|
|
64
64
|
property: K,
|
|
65
|
-
): go.
|
|
66
|
-
function get<K extends keyof go.
|
|
65
|
+
): go.Properties[K];
|
|
66
|
+
function get<K extends keyof go.Properties>(
|
|
67
67
|
url: SceneAddress | Hash | Url,
|
|
68
68
|
property: K,
|
|
69
69
|
options: GoPropertyOptions,
|
|
70
|
-
): go.
|
|
70
|
+
): go.Properties[K];
|
|
71
71
|
function get(
|
|
72
72
|
url: SceneAddress | Hash | Url,
|
|
73
73
|
property: string | Hash,
|
|
@@ -114,7 +114,7 @@ declare global {
|
|
|
114
114
|
* // Name the target component to gate the value to its property type. The
|
|
115
115
|
* // empty call applies the type argument, then the inner call infers the key.
|
|
116
116
|
* // A read-only property such as "animation" is not a key it accepts:
|
|
117
|
-
* go.set<sprite.
|
|
117
|
+
* go.set<sprite.Properties>()("#sprite", "playback_rate", 2);
|
|
118
118
|
* ```
|
|
119
119
|
*/
|
|
120
120
|
function set<P>(): <K extends WritableKey<P>>(
|
|
@@ -123,15 +123,15 @@ declare global {
|
|
|
123
123
|
value: P[K],
|
|
124
124
|
...options: [] | [GoPropertyOptions]
|
|
125
125
|
) => void;
|
|
126
|
-
function set<K extends keyof go.
|
|
126
|
+
function set<K extends keyof go.Properties>(
|
|
127
127
|
url: SceneAddress | Hash | Url,
|
|
128
128
|
property: K,
|
|
129
|
-
value: go.
|
|
129
|
+
value: go.Properties[K],
|
|
130
130
|
): void;
|
|
131
|
-
function set<K extends keyof go.
|
|
131
|
+
function set<K extends keyof go.Properties>(
|
|
132
132
|
url: SceneAddress | Hash | Url,
|
|
133
133
|
property: K,
|
|
134
|
-
value: go.
|
|
134
|
+
value: go.Properties[K],
|
|
135
135
|
options: GoPropertyOptions,
|
|
136
136
|
): void;
|
|
137
137
|
function set(
|
package/src/gui-overloads.d.ts
CHANGED
|
@@ -17,17 +17,17 @@ type PropName<P> = P extends { readonly __brand: `gui.PROP_${infer S}` } ? Lower
|
|
|
17
17
|
// gui.cpp g_Properties: these four have no `.x`..`.w` sub-keys.
|
|
18
18
|
type ScalarName = "inner_radius" | "fill_angle" | "leading" | "tracking";
|
|
19
19
|
|
|
20
|
-
type VectorName = Exclude<PropName<gui.
|
|
20
|
+
type VectorName = Exclude<PropName<gui.Prop>, ScalarName>;
|
|
21
21
|
|
|
22
|
-
type NodePropertyName<K> = K extends keyof gui.
|
|
22
|
+
type NodePropertyName<K> = K extends keyof gui.NodeProperties
|
|
23
23
|
? K
|
|
24
|
-
: Extract<PropName<K>, keyof gui.
|
|
24
|
+
: Extract<PropName<K>, keyof gui.NodeProperties>;
|
|
25
25
|
|
|
26
26
|
// gui_script.cpp:LuaSet: `rotation` takes only a quat, every other vector a
|
|
27
27
|
// vector4 or a vector3, and a sub-key or scalar a number.
|
|
28
|
-
type NodePropertyWrite<N extends keyof gui.
|
|
28
|
+
type NodePropertyWrite<N extends keyof gui.NodeProperties> = N extends "rotation"
|
|
29
29
|
? Quaternion
|
|
30
|
-
: gui.
|
|
30
|
+
: gui.NodeProperties[N] extends number
|
|
31
31
|
? number
|
|
32
32
|
: Vector4 | Vector3;
|
|
33
33
|
|
|
@@ -38,7 +38,7 @@ declare global {
|
|
|
38
38
|
* property reads as a vmath.vector4 and `rotation` as a vmath.quat; their
|
|
39
39
|
* `.x`..`.w` sub-keys and the four scalar properties read as a number.
|
|
40
40
|
*/
|
|
41
|
-
type
|
|
41
|
+
type NodeProperties = {
|
|
42
42
|
[K in
|
|
43
43
|
| VectorName
|
|
44
44
|
| `${VectorName}.${"x" | "y" | "z" | "w"}`
|
|
@@ -87,10 +87,10 @@ declare global {
|
|
|
87
87
|
* const node_position = gui.get(node, "position");
|
|
88
88
|
* ```
|
|
89
89
|
*/
|
|
90
|
-
function get<K extends keyof gui.
|
|
90
|
+
function get<K extends keyof gui.NodeProperties | gui.Prop>(
|
|
91
91
|
node: Opaque<"node">,
|
|
92
92
|
property: K,
|
|
93
|
-
): gui.
|
|
93
|
+
): gui.NodeProperties[NodePropertyName<K>];
|
|
94
94
|
/**
|
|
95
95
|
* Gets a material constant of a node, or any property named by a hash. Pass
|
|
96
96
|
* the constant's name as a hash, such as `hash("tint")`. Reading an array
|
|
@@ -173,7 +173,7 @@ declare global {
|
|
|
173
173
|
* gui.set_rotation(node, vmath.vector3(0, 0, 45));
|
|
174
174
|
* ```
|
|
175
175
|
*/
|
|
176
|
-
function set<K extends keyof gui.
|
|
176
|
+
function set<K extends keyof gui.NodeProperties | gui.Prop>(
|
|
177
177
|
node: Opaque<"node">,
|
|
178
178
|
property: K,
|
|
179
179
|
value: NodePropertyWrite<NodePropertyName<K>>,
|
|
@@ -393,7 +393,7 @@ declare global {
|
|
|
393
393
|
*/
|
|
394
394
|
function animate(
|
|
395
395
|
node: Opaque<"node">,
|
|
396
|
-
property: keyof gui.
|
|
396
|
+
property: keyof gui.NodeProperties | gui.Prop | Hash,
|
|
397
397
|
to: number | Vector3 | Vector4 | Quaternion,
|
|
398
398
|
easing: gui.Easing | Vector,
|
|
399
399
|
duration: number,
|
|
@@ -477,7 +477,7 @@ declare global {
|
|
|
477
477
|
*/
|
|
478
478
|
function animate(
|
|
479
479
|
node: Opaque<"node">,
|
|
480
|
-
property: keyof gui.
|
|
480
|
+
property: keyof gui.NodeProperties | gui.Prop | Hash,
|
|
481
481
|
to: number | Vector3 | Vector4 | Quaternion,
|
|
482
482
|
easing: gui.Easing | Vector,
|
|
483
483
|
duration: number,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { htmlToDocText } from "./doc-comment";
|
|
2
|
-
import { LIBRARY_INDEX_SLOT_CLASSIFICATIONS } from "./library-index-slot-classifications";
|
|
3
2
|
|
|
4
3
|
// The class records the base Defold itself counts from. TypeScript passes every
|
|
5
4
|
// engine position to Defold, and takes it back, unchanged in that base:
|
|
@@ -543,36 +542,101 @@ export function withIndexBaseNotes(
|
|
|
543
542
|
return appendNotes(doc, indexBaseNotes(elementName, kind, slotName));
|
|
544
543
|
}
|
|
545
544
|
|
|
545
|
+
// The class records the base the library itself counts from, which TypeScript
|
|
546
|
+
// passes through unchanged, exactly as `INDEX_SLOT_CLASSIFICATIONS` records
|
|
547
|
+
// Defold's.
|
|
548
|
+
export type LibraryIndexSlotClassifications = ReadonlyMap<
|
|
549
|
+
string,
|
|
550
|
+
Pick<IndexSlotClassification, "class" | "evidence">
|
|
551
|
+
>;
|
|
552
|
+
|
|
553
|
+
const INDEX_SLOT_CLASSES: ReadonlySet<string> = new Set<IndexSlotClass>([
|
|
554
|
+
"native-1",
|
|
555
|
+
"native-0",
|
|
556
|
+
"not-a-position",
|
|
557
|
+
]);
|
|
558
|
+
|
|
559
|
+
function isPlainObject(value: unknown): value is Record<string, unknown> {
|
|
560
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// Keyed `<page>/<element>:<param|return|field>:<slot>[:<field>]`, `<page>` being
|
|
564
|
+
// the library page key (`gooey`, `spine.gui`, `rive.cmd`), so a library slot
|
|
565
|
+
// never shares a key with an engine one (`spine.gui` documents `gui.*`). A class
|
|
566
|
+
// field is keyed `<page>/<Typedef>:field:<member>`, a callback argument as a
|
|
567
|
+
// field of its callback slot, and each positional value of an unnamed
|
|
568
|
+
// multi-value return as a field of that return (`cast:return::tile_x`). A
|
|
569
|
+
// typedef method is keyed by its bare name, so one key covers every class of the
|
|
570
|
+
// page that declares that method.
|
|
571
|
+
// `docs-site/app/lib/library-index-slot-gate.test.ts` reds on a scanned slot
|
|
572
|
+
// missing from `library-types/index-slot-classifications.json` and on an entry
|
|
573
|
+
// no library page declares.
|
|
574
|
+
export function parseLibraryIndexSlotClassifications(
|
|
575
|
+
json: unknown,
|
|
576
|
+
): LibraryIndexSlotClassifications {
|
|
577
|
+
if (!isPlainObject(json)) {
|
|
578
|
+
throw new Error("library index-slot classifications must be a JSON object");
|
|
579
|
+
}
|
|
580
|
+
const map = new Map<string, Pick<IndexSlotClassification, "class" | "evidence">>();
|
|
581
|
+
for (const [key, value] of Object.entries(json)) {
|
|
582
|
+
if (!isPlainObject(value)) {
|
|
583
|
+
throw new Error(`library index-slot classification ${key} must be an object`);
|
|
584
|
+
}
|
|
585
|
+
const { class: slotClass, evidence } = value;
|
|
586
|
+
if (typeof slotClass !== "string" || !INDEX_SLOT_CLASSES.has(slotClass)) {
|
|
587
|
+
throw new Error(
|
|
588
|
+
`library index-slot classification ${key} has class ${JSON.stringify(slotClass)}, not one of ${[...INDEX_SLOT_CLASSES].join(", ")}`,
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
if (typeof evidence !== "string" || evidence.trim() === "") {
|
|
592
|
+
throw new Error(`library index-slot classification ${key} needs a non-blank evidence string`);
|
|
593
|
+
}
|
|
594
|
+
map.set(key, { class: slotClass as IndexSlotClass, evidence });
|
|
595
|
+
}
|
|
596
|
+
return map;
|
|
597
|
+
}
|
|
598
|
+
|
|
546
599
|
// The same notes for a slot or class field of a library page, read from the
|
|
547
600
|
// library map under that page's key and naming the library as the receiver.
|
|
548
601
|
export function libraryIndexBaseNotes(
|
|
602
|
+
classifications: LibraryIndexSlotClassifications,
|
|
549
603
|
page: string,
|
|
550
604
|
elementName: string,
|
|
551
605
|
kind: "param" | "return" | "field",
|
|
552
606
|
slotName: string,
|
|
553
607
|
): string[] {
|
|
554
608
|
return slotBaseNotes(
|
|
555
|
-
|
|
609
|
+
classifications,
|
|
556
610
|
`\`${page}\``,
|
|
557
611
|
`${page}/${elementName}:${kind}:${slotName}`,
|
|
558
612
|
);
|
|
559
613
|
}
|
|
560
614
|
|
|
561
615
|
export function withLibraryIndexBaseNotes(
|
|
616
|
+
classifications: LibraryIndexSlotClassifications,
|
|
562
617
|
page: string,
|
|
563
618
|
elementName: string,
|
|
564
619
|
kind: "param" | "return" | "field",
|
|
565
620
|
slotName: string,
|
|
566
621
|
doc: string,
|
|
567
622
|
): string {
|
|
568
|
-
return appendNotes(
|
|
623
|
+
return appendNotes(
|
|
624
|
+
doc,
|
|
625
|
+
libraryIndexBaseNotes(classifications, page, elementName, kind, slotName),
|
|
626
|
+
);
|
|
569
627
|
}
|
|
570
628
|
|
|
571
629
|
// Where a declaration's index notes come from: the engine map, naming Defold, or
|
|
572
|
-
// the library map under each listed page, naming that library. A
|
|
573
|
-
// extension declaration never reads the engine map, so an element it
|
|
574
|
-
// name with (`spine.gui` declares `gui.*`) never claims Defold as its
|
|
575
|
-
|
|
630
|
+
// the caller's library map under each listed page, naming that library. A
|
|
631
|
+
// library or extension declaration never reads the engine map, so an element it
|
|
632
|
+
// shares a name with (`spine.gui` declares `gui.*`) never claims Defold as its
|
|
633
|
+
// receiver.
|
|
634
|
+
export type IndexBaseSource =
|
|
635
|
+
| "engine"
|
|
636
|
+
| {
|
|
637
|
+
readonly pages: readonly string[];
|
|
638
|
+
readonly classifications: LibraryIndexSlotClassifications;
|
|
639
|
+
};
|
|
576
640
|
|
|
577
641
|
export type IndexBaseNoteResolver = (
|
|
578
642
|
elementName: string,
|
|
@@ -582,7 +646,9 @@ export type IndexBaseNoteResolver = (
|
|
|
582
646
|
|
|
583
647
|
export function indexBaseNoteResolver(source: IndexBaseSource): IndexBaseNoteResolver {
|
|
584
648
|
if (source === "engine") return indexBaseNotes;
|
|
585
|
-
const { pages } = source;
|
|
649
|
+
const { pages, classifications } = source;
|
|
586
650
|
return (elementName, kind, slotName) =>
|
|
587
|
-
pages.flatMap((page) =>
|
|
651
|
+
pages.flatMap((page) =>
|
|
652
|
+
libraryIndexBaseNotes(classifications, page, elementName, kind, slotName),
|
|
653
|
+
);
|
|
588
654
|
}
|
package/src/index.ts
CHANGED
|
@@ -67,6 +67,7 @@ export {
|
|
|
67
67
|
TS_IDENTIFIER,
|
|
68
68
|
TS_RESERVED_NAMES,
|
|
69
69
|
} from "./emit-dts";
|
|
70
|
+
export { ENGINE_TYPE_NAME_OVERRIDES, engineTypeName } from "./engine-type-name";
|
|
70
71
|
export {
|
|
71
72
|
hashExampleSource,
|
|
72
73
|
lookupExampleSegments,
|
|
@@ -87,11 +88,12 @@ export {
|
|
|
87
88
|
INDEX_SLOT_CLASSIFICATIONS,
|
|
88
89
|
type IndexSlotClass,
|
|
89
90
|
type IndexSlotClassification,
|
|
91
|
+
type LibraryIndexSlotClassifications,
|
|
90
92
|
libraryIndexBaseNotes,
|
|
93
|
+
parseLibraryIndexSlotClassifications,
|
|
91
94
|
withIndexBaseNotes,
|
|
92
95
|
withLibraryIndexBaseNotes,
|
|
93
96
|
} from "./index-slot-classifications";
|
|
94
|
-
export { LIBRARY_INDEX_SLOT_CLASSIFICATIONS } from "./library-index-slot-classifications";
|
|
95
97
|
export {
|
|
96
98
|
hasTopLevelUnion,
|
|
97
99
|
luaMultiReturn,
|
|
@@ -130,6 +132,7 @@ export {
|
|
|
130
132
|
type ModuleWrapOptions,
|
|
131
133
|
type WrapOptions,
|
|
132
134
|
wrapAsAmbientGlobal,
|
|
135
|
+
wrapAsGlobalTableModule,
|
|
133
136
|
wrapAsModule,
|
|
134
137
|
} from "./publish-dts";
|
|
135
138
|
export {
|
package/src/lifecycle.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Hash, Url } from "./core-types";
|
|
2
2
|
|
|
3
|
-
// Fields and docs follow the go ref-doc's `on_input.touch` STRUCT, whose keys are
|
|
3
|
+
// Fields and docs follow the go ref-doc's `on_input.touch` STRUCT (`go.on_input.Touch`), whose keys are
|
|
4
4
|
// the ones comp_script.cpp pushes; lifecycle-member-docs drift-guards the docs
|
|
5
5
|
// against it, and a ref-doc re-pin is reconciled by hand.
|
|
6
6
|
export interface InputTouch {
|
|
@@ -54,7 +54,7 @@ export interface InputTouch {
|
|
|
54
54
|
screen_dy: number;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
// Fields and docs follow the go ref-doc's `on_input.action` STRUCT, whose keys are
|
|
57
|
+
// Fields and docs follow the go ref-doc's `on_input.action` STRUCT (`go.on_input.Action`), whose keys are
|
|
58
58
|
// the ones comp_script.cpp pushes; lifecycle-member-docs drift-guards the docs
|
|
59
59
|
// against it, and a ref-doc re-pin is reconciled by hand.
|
|
60
60
|
export interface InputAction {
|
package/src/publish-dts.ts
CHANGED
|
@@ -45,6 +45,22 @@ export function wrapAsAmbientGlobal(opts: WrapOptions): string {
|
|
|
45
45
|
return `/** @noSelfInFile */\n${importLine}declare global {\n${indented}\n}\n\nexport {};\n`;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
// The emitted namespace as an ambient `declare module "<namespace>"` tagged
|
|
49
|
+
// `@globalTable`, so an import lowers to a local alias of the global the
|
|
50
|
+
// extension registers. The description stays a separate JSDoc above the tag,
|
|
51
|
+
// since TypeScript reads tags from the last one. The body keeps the namespace's
|
|
52
|
+
// indentation, and engine handles resolve as ambient globals, as in
|
|
53
|
+
// `wrapAsModule`.
|
|
54
|
+
export function wrapAsGlobalTableModule(opts: WrapOptions): string {
|
|
55
|
+
const body = opts.emitted
|
|
56
|
+
.replace(
|
|
57
|
+
/(^|\n)declare\s+namespace\s+[\w$.]+\s*\{/,
|
|
58
|
+
(_match, lead) => `${lead}/** @globalTable */\ndeclare module "${opts.namespace}" {`,
|
|
59
|
+
)
|
|
60
|
+
.trimEnd();
|
|
61
|
+
return `/** @noSelfInFile */\n${body}\n`;
|
|
62
|
+
}
|
|
63
|
+
|
|
48
64
|
export function wrapAsModule(opts: ModuleWrapOptions): string {
|
|
49
65
|
// ambient-globals-only: the module form references engine handles (`Hash`,
|
|
50
66
|
// `Vector3`, ...) as ambient globals and emits no top-level import. A top-level
|
package/src/script-api.ts
CHANGED
|
@@ -22,18 +22,12 @@ export interface RefDocConstantElement {
|
|
|
22
22
|
name: string;
|
|
23
23
|
brief: string;
|
|
24
24
|
description: string;
|
|
25
|
+
/** The scalar's declared `type:` tokens; an engine `CONSTANT` carries none. */
|
|
26
|
+
types: string[];
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
export type RefDocElement = RefDocFunctionElement | RefDocConstantElement;
|
|
28
30
|
|
|
29
|
-
export interface ScriptApiOptions {
|
|
30
|
-
// Also carry scalar members as CONSTANT elements and function `examples:` as
|
|
31
|
-
// ref-doc examples HTML, and nested callback arguments, table fields and
|
|
32
|
-
// optional flags on each slot. Off for the typing lanes, whose emitter and
|
|
33
|
-
// frozen goldens only ever see flat functions without examples.
|
|
34
|
-
complete?: boolean;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
31
|
export interface RefDoc {
|
|
38
32
|
info: { namespace: string; brief: string; description: string };
|
|
39
33
|
elements: RefDocElement[];
|
|
@@ -47,6 +41,11 @@ function stringOr(value: unknown, fallback: string): string {
|
|
|
47
41
|
return typeof value === "string" ? value : fallback;
|
|
48
42
|
}
|
|
49
43
|
|
|
44
|
+
// A `.script_api` spells a slot that takes one of a set of named constants as
|
|
45
|
+
// `enum`; the core ref-doc token for the same meaning is `constant`, which the
|
|
46
|
+
// emitter expands to the constants the slot's doc names.
|
|
47
|
+
const TYPE_TOKEN_ALIASES: ReadonlyMap<string, string> = new Map([["enum", "constant"]]);
|
|
48
|
+
|
|
50
49
|
// A `.script_api` `type:` may spell a union inline (`string | nil`), where the
|
|
51
50
|
// core ref-doc format carries one token per alternative. Splitting here keeps the
|
|
52
51
|
// downstream emitter and fidelity resolver working in single tokens. A `type:`
|
|
@@ -57,7 +56,8 @@ function splitTypeTokens(type: unknown): string[] {
|
|
|
57
56
|
return type
|
|
58
57
|
.split("|")
|
|
59
58
|
.map((token) => token.trim())
|
|
60
|
-
.filter((token) => token.length > 0)
|
|
59
|
+
.filter((token) => token.length > 0)
|
|
60
|
+
.map((token) => TYPE_TOKEN_ALIASES.get(token) ?? token);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
// Upstream writes a slot list either as a YAML list or, for a lone slot, as a
|
|
@@ -79,13 +79,12 @@ function isFunctionName(name: string): boolean {
|
|
|
79
79
|
return name !== "None" && FUNCTION_NAME.test(name);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
function mapSlot(item: Record<string, unknown
|
|
82
|
+
function mapSlot(item: Record<string, unknown>): RefDocParameter {
|
|
83
83
|
const slot: RefDocParameter = {
|
|
84
84
|
name: stringOr(item.name, "").replace(REQUIRED_SUFFIX, ""),
|
|
85
85
|
doc: stringOr(item.desc, ""),
|
|
86
86
|
types: splitTypeTokens(item.type),
|
|
87
87
|
};
|
|
88
|
-
if (!complete) return slot;
|
|
89
88
|
// A callback lists its arguments under `parameters:` and a table its keys under
|
|
90
89
|
// `fields:` or `members:`; the ref-doc format carries all as `fields`. A
|
|
91
90
|
// callback's own `self` is kept, since the engine really passes it to the callback.
|
|
@@ -94,18 +93,18 @@ function mapSlot(item: Record<string, unknown>, complete: boolean): RefDocParame
|
|
|
94
93
|
...slotList(item.fields),
|
|
95
94
|
...slotList(item.members),
|
|
96
95
|
];
|
|
97
|
-
if (nested.length > 0) slot.fields = nested.map(
|
|
96
|
+
if (nested.length > 0) slot.fields = nested.map(mapSlot);
|
|
98
97
|
if (item.optional === true) slot.is_optional = "True";
|
|
99
98
|
return slot;
|
|
100
99
|
}
|
|
101
100
|
|
|
102
|
-
function mapParameters(raw: unknown
|
|
101
|
+
function mapParameters(raw: unknown): RefDocParameter[] {
|
|
103
102
|
const out: RefDocParameter[] = [];
|
|
104
103
|
for (const item of slotList(raw)) {
|
|
105
104
|
// The script_api lists the implicit `self` the engine passes; the emitter
|
|
106
105
|
// stamps @noSelfInFile, so generated signatures must not declare it.
|
|
107
106
|
if (stringOr(item.name, "") === "self") continue;
|
|
108
|
-
out.push(mapSlot(item
|
|
107
|
+
out.push(mapSlot(item));
|
|
109
108
|
}
|
|
110
109
|
return out;
|
|
111
110
|
}
|
|
@@ -153,22 +152,23 @@ function isScalar(member: Record<string, unknown>): boolean {
|
|
|
153
152
|
|
|
154
153
|
/**
|
|
155
154
|
* Convert a parsed Defold extension `.script_api` document into the core
|
|
156
|
-
* ref-doc JSON object shape that `parseDefoldApiDoc` consumes.
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
* `
|
|
162
|
-
*
|
|
163
|
-
*
|
|
155
|
+
* ref-doc JSON object shape that `parseDefoldApiDoc` consumes. `type: function`
|
|
156
|
+
* members become FUNCTION elements; scalar members at the top level and one
|
|
157
|
+
* table deep become CONSTANT elements carrying their `type:` tokens, so a
|
|
158
|
+
* `type: string` scalar reaches the emitter as a string constant; each
|
|
159
|
+
* function's `examples:` becomes
|
|
160
|
+
* `codehilite` examples HTML that keeps each fence's language; and each slot's
|
|
161
|
+
* nested `parameters:`/`fields:` and `optional: true` become ref-doc `fields`
|
|
162
|
+
* and `is_optional`. The Libraries pages, the `script-api` lane, the extension
|
|
163
|
+
* goldens and `resolve` all read this one conversion.
|
|
164
164
|
*
|
|
165
|
-
* Upstream dialects are normalized
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
165
|
+
* Upstream dialects are normalized: a function's slots are read from the first
|
|
166
|
+
* present of `parameters:`, `params:` or `members:` and its returns from
|
|
167
|
+
* `returns:` or `return:`, any slot list may be a single mapping, a table slot's
|
|
168
|
+
* `members:` nest like `fields:`, a `(REQUIRED)` name suffix is dropped, and a
|
|
169
|
+
* function named `None` or not a Lua identifier is skipped.
|
|
170
170
|
*/
|
|
171
|
-
export function scriptApiToRefDoc(parsed: unknown
|
|
171
|
+
export function scriptApiToRefDoc(parsed: unknown): RefDoc {
|
|
172
172
|
if (!Array.isArray(parsed)) {
|
|
173
173
|
throw new Error("scriptApiToRefDoc: expected a top-level YAML list");
|
|
174
174
|
}
|
|
@@ -193,13 +193,10 @@ export function scriptApiToRefDoc(parsed: unknown, options: ScriptApiOptions = {
|
|
|
193
193
|
type: "FUNCTION",
|
|
194
194
|
name,
|
|
195
195
|
description: stringOr(member.desc, ""),
|
|
196
|
-
parameters: mapParameters(
|
|
197
|
-
|
|
198
|
-
options.complete === true,
|
|
199
|
-
),
|
|
200
|
-
returnvalues: mapParameters(member.returns ?? member.return, options.complete === true),
|
|
196
|
+
parameters: mapParameters(member.parameters ?? member.params ?? member.members),
|
|
197
|
+
returnvalues: mapParameters(member.returns ?? member.return),
|
|
201
198
|
};
|
|
202
|
-
const examples =
|
|
199
|
+
const examples = examplesHtml(member.examples);
|
|
203
200
|
if (examples !== "") element.examples = examples;
|
|
204
201
|
return element;
|
|
205
202
|
};
|
|
@@ -211,6 +208,7 @@ export function scriptApiToRefDoc(parsed: unknown, options: ScriptApiOptions = {
|
|
|
211
208
|
name,
|
|
212
209
|
brief: stringOr(member.desc, ""),
|
|
213
210
|
description: stringOr(member.desc, ""),
|
|
211
|
+
types: splitTypeTokens(member.type),
|
|
214
212
|
});
|
|
215
213
|
for (const member of members) {
|
|
216
214
|
if (!isRecord(member)) continue;
|
|
@@ -219,7 +217,7 @@ export function scriptApiToRefDoc(parsed: unknown, options: ScriptApiOptions = {
|
|
|
219
217
|
elements.push(fnElement(`${namespace}.${stringOr(member.name, "")}`, member));
|
|
220
218
|
continue;
|
|
221
219
|
}
|
|
222
|
-
if (
|
|
220
|
+
if (isScalar(member)) {
|
|
223
221
|
elements.push(constantElement(`${namespace}.${stringOr(member.name, "")}`, member));
|
|
224
222
|
continue;
|
|
225
223
|
}
|
|
@@ -236,7 +234,7 @@ export function scriptApiToRefDoc(parsed: unknown, options: ScriptApiOptions = {
|
|
|
236
234
|
if (subMember.type === "function") {
|
|
237
235
|
if (isFunctionName(stringOr(subMember.name, "")))
|
|
238
236
|
elements.push(fnElement(name, subMember));
|
|
239
|
-
} else if (
|
|
237
|
+
} else if (isScalar(subMember)) {
|
|
240
238
|
elements.push(constantElement(name, subMember));
|
|
241
239
|
}
|
|
242
240
|
}
|
|
@@ -249,6 +247,6 @@ export function scriptApiToRefDoc(parsed: unknown, options: ScriptApiOptions = {
|
|
|
249
247
|
return doc;
|
|
250
248
|
}
|
|
251
249
|
|
|
252
|
-
export function parseScriptApi(yamlText: string
|
|
253
|
-
return scriptApiToRefDoc(parse(yamlText)
|
|
250
|
+
export function parseScriptApi(yamlText: string): RefDoc {
|
|
251
|
+
return scriptApiToRefDoc(parse(yamlText));
|
|
254
252
|
}
|
package/src/socket-types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
//
|
|
10
10
|
// const opt: socket.TCPOptions = 'keepalive';
|
|
11
11
|
// // TCP/UDP are convenience intersections for consumer annotations;
|
|
12
|
-
// // no socket.* function returns them (tcp() yields a `
|
|
12
|
+
// // no socket.* function returns them (tcp() yields a `SocketMaster` handle).
|
|
13
13
|
//
|
|
14
14
|
// The literal unions are LuaSocket-domain, not engine-ref-doc, so they live
|
|
15
15
|
// here rather than in the regen pipeline.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
declare global {
|
|
18
18
|
namespace socket {
|
|
19
19
|
/** A TCP handle in any of its three lifecycle roles. */
|
|
20
|
-
type TCP =
|
|
20
|
+
type TCP = SocketClient & SocketMaster & SocketServer;
|
|
21
21
|
/** Option names accepted by a TCP handle's `setoption`. */
|
|
22
22
|
type TCPOptions = "ipv6-v6only" | "keepalive" | "linger" | "reuseaddr" | "tcp-nodelay";
|
|
23
23
|
/** Error string a TCP `receive` may return. */
|
|
@@ -29,7 +29,7 @@ declare global {
|
|
|
29
29
|
/** Blocking mode passed to a TCP handle's `settimeout`. */
|
|
30
30
|
type TCPTimeoutMode = "b" | "t";
|
|
31
31
|
/** A UDP handle in either of its two lifecycle roles. */
|
|
32
|
-
type UDP =
|
|
32
|
+
type UDP = SocketConnected & SocketUnconnected;
|
|
33
33
|
/** Option names accepted by a UDP handle's `setoption`. */
|
|
34
34
|
type UDPOptions =
|
|
35
35
|
| "broadcast"
|