Skip to content

Expose the type of an asset handle#290

Merged
waynemwashuma merged 1 commit into
wimaengine:devfrom
waynemwashuma:expose-handle-types
Mar 16, 2026
Merged

Expose the type of an asset handle#290
waynemwashuma merged 1 commit into
wimaengine:devfrom
waynemwashuma:expose-handle-types

Conversation

@waynemwashuma
Copy link
Copy Markdown
Collaborator

@waynemwashuma waynemwashuma commented Mar 16, 2026

Objective

Expose the type of an asset directly on its Handle instance to allow type-aware operations and improve developer ergonomics.

Solution

Added a readonly type property to the Handle initialized from the owning Assets when the handle is constructed.

Showcase

const handle = assets.add(someAsset);
console.log(handle.type); // Logs the constructor of the asset

Migration guide

No breaking changes.

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@waynemwashuma waynemwashuma self-assigned this Mar 16, 2026
@waynemwashuma waynemwashuma added the type:enhancement New feature or request label Mar 16, 2026
@waynemwashuma waynemwashuma merged commit d1d5f22 into wimaengine:dev Mar 16, 2026
7 checks passed
@waynemwashuma waynemwashuma deleted the expose-handle-types branch March 16, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:asset type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant