Skip to content

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

Merged
Rathoz merged 6 commits intomainfrom
class-instance-of
Sep 17, 2024
Merged

refactor(standard): add non-instanced is_a/instanceOf method#4722
Rathoz merged 6 commits intomainfrom
class-instance-of

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
@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