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

refactor(standard): add non-instanced is_a/instanceOf method #4722

Merged
merged 6 commits into from
Sep 17, 2024

Conversation

Rathoz
Copy link
Collaborator

@Rathoz Rathoz commented Sep 12, 2024

Summary

Replaced object:is_a(aClass) with Class.instanceOf(object, aClass). Old call pattern can still be used, but considered deprecated and will be removed in the future.
Also updated some annos in streamlinks now that LuaLS/lua-language-server#2708 is fixed.
The object:is_a(aClass) is very annoying to use, as one needs to first check if object is a table and is_a is a function in that table, before being able to call it.

How did you test this change?

Tested with class+infobox+widget changes

@Rathoz Rathoz requested a review from hjpalpha September 12, 2024 12:08
@Rathoz Rathoz requested a review from hjpalpha September 17, 2024 14:14
@Rathoz Rathoz merged commit 5ce1047 into main Sep 17, 2024
5 checks passed
@Rathoz Rathoz deleted the class-instance-of branch September 17, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants