Skip to content
github-actions[bot] edited this page Aug 23, 2024 · 8 revisions

a class prototype template thing that dictates what should be the basis for all instances

the main big thing for the module that does all the big cool awesome things


to learn how to create class prototyps see keyword class to learn how to create class instances see keyword new

Lua
localclass=require("classjs")("class");
localExample=class"Example" {
constructor=function(self, name)
self.Name=name;
end,
Test=function(self)
returnstring.lower(self.Name) end,
Type=1
}
print(Example) -- [class Example]

Type:

  • Metatable

Returns:

Sources:

Arguments:

  • nameString
    name of the class

  • prototableTable
    prototype data used for the class's properties



Methods


Properties



classjs docs


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