Skip to content

Prototype.__isa()

github-actions[bot] edited this page Aug 26, 2024 · 1 revision

checks if a class instance's prototype matches up with a given prototype
there's also a version in the default payload, see isa()

to learn how to create classes see keyword class

Lua
local class, new = require("classjs")("class", "new", "isa");


local Example = class "Example" {
    constructor = function(self, name)
        self.Name = name;
    end,

}


local pim = new "Example"("Pim");


print(pim.__isa("Example")); -- true

Type:

  • Function

Returns:

  • Boolean

Sources:

Arguments:




classjs docs

Home | Lib


Keywords

πŸ›ˆ class

πŸ›ˆ extend

πŸ›ˆ new

Methods

πŸ›ˆ isa()

πŸ›ˆ getclass()

πŸ›ˆ Prototype

πŸ›ˆ new()

πŸ›ˆ __isa()

πŸ›ˆ __super()

πŸ›ˆ __name

πŸ›ˆ __instances

πŸ›ˆ __prototype

πŸ›ˆ __extendee

πŸ›ˆ __class

πŸ›ˆ PrototypeItem

πŸ›ˆ new()

πŸ›ˆ __value

πŸ›ˆ __parent

πŸ›ˆ __writable

πŸ›ˆ __configurable

πŸ›ˆ __enumerable

πŸ›ˆ Object

πŸ›ˆ defineProperties()

πŸ›ˆ defineProperty()

πŸ›ˆ entries()

πŸ›ˆ getOwnPropertyDescriptor()

πŸ›ˆ getOwnPropertyDescriptors()

πŸ›ˆ keys()

πŸ›ˆ values()


Clone this wiki locally