Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: export ImageAsset and FontAsset types #337

Conversation

cdelguercio
Copy link
Contributor

Added so that I could cast a FileAsset to ImageAsset or FontAsset and call setRenderImage or setFont without TypeScript getting angry.

@zplata
Copy link
Contributor

zplata commented Nov 6, 2023

Thanks for the PR @cdelguercio! We'll get this integrated

rive-engineering pushed a commit that referenced this pull request Nov 7, 2023
Community contribution PR: #337

Building on top of this contribution to expose the FontAsset types to the high-level API, which doesn't come by default when including it in `rive_advanced.mjs.d.ts` because the types exposed on high-level currently have to be set in `rive.ts` (otherwise, only the low-level API runtimes can access the types from `rive_advanced.mjs.d.ts`).

Switched the OOB assets example to use TS to test this

Diffs=
237f41f2a Add types for ImageAsset and FontAsset (#6213)

Co-authored-by: Zachary Plata <[email protected]>
Co-authored-by: cdelguercio <[email protected]>
@zplata
Copy link
Contributor

zplata commented Nov 8, 2023

This change was introduced from our upstream workflow and released in v2.7.1 - with your commit credited here: 9e54b20

Thanks for the contribution!

@zplata zplata closed this Nov 8, 2023
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.

2 participants