Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

addPreClass()

github-actions[bot] edited this page Sep 30, 2024 · 1 revision

addPreClass(), addPreClass() and addSub() adds a new subclass inside of the class itself instead of the prototype so you can use it outside of an instance

const Class = require('aepl');


new Class("Main", class {
    constructor() {
        this.data = [1, 2, 3];
    }
});


Main.addPreSub("Layer0", class { /* class info */ });
Main.addPreClass("Layer1", class { /* class info */ });
Main.addPreSubClass("Layer2", class { /* class info */ });


console.log(Main.Layer0); // AeplPreClass

Class.addPreClass()

description: adds a new subclass inside of the class itself instead of the prototype so you can use it outside of an instance
calls:

  • addPreClass()
  • addPreSubClass()/addPreSubclass()
  • addPreSub()
  • setPreClass()
  • setPreSubClass()/setPreSubclass()
  • setPreSub()
  • newPreClass()
  • newPreSubClass()/newPreSubclass()
  • newPreSub()
  • addPC()
  • addPSC()
  • addPS()
  • setPC()
  • setPSC()
  • setPS()
  • newPC()
  • newPSC()
  • newPS()

Clone this wiki locally