Skip to content

feat(bms): type the references clocks, the primary window and states return - #676

Open
makspll wants to merge 4 commits into
agent/lad-luals-ci-checkfrom
agent/lad-typed-ref-returns
Open

makspll wants to merge 4 commits into
agent/lad-luals-ci-checkfrom
agent/lad-typed-ref-returns

Conversation

@makspll

@makspll makspll commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Part of #512. Addresses #657.

Bindings that returned a bare ReflectReference now return ValueOf<T>, so the declarations name the type (runtime behaviour is unchanged):

  • world.time, virtual_time, real_time, fixed_time -> ValueOf<Time<..>> (time.Time.Virtual, ...)
  • Window.primary -> Option<ValueOf<Window>>
  • world.get_state(state_type) -> generic like get_resource: TypeOf<V<ScriptTypeRegistration>, A> -> Option<ValueOf<A>>

With world.add_asset/load_asset/get_asset from #670 this covers the bindings #657 lists. Remaining ReflectReference returns are helpers, not script functions.

LuaLS baseline (xtask/luals_baseline.json): undefined-field 79 -> 51, param-type-mismatch 160 -> 159, rest unchanged.

Tests: script_tests filters time, window, state (with bevy_state_bindings), cargo xtask check-lua-types.

@semanticdiff-com

semanticdiff-com Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

@makspll
makspll added this pull request to stack #674 October 27, 2026 12:32
@makspll makspll changed the title feat(bindings): type the references clocks, the primary window and states return feat(bms): type the references clocks, the primary window and states return Oct 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant