forge.class
    Preparing search index...

    Class ClassDefinition

    A declared class. It holds its own members only, the ClassManager finds inherited ones.

    Index
    fields: Map<string, IField> = ...

    Instance fields, without # ones.

    hiddenFields: Map<string, IField> = ...

    # fields.

    hiddenMethods: Map<string, IMethod> = ...

    # methods.

    methods: Map<string, IMethod> = ...

    Instance methods and the constructor, without # ones.

    name: string
    parent: string | null = null

    The class it extends.

    staticFields: Map<string, IField> = ...

    Static fields, # ones included.

    staticMethods: Map<string, IMethod> = ...

    Static methods, # ones included.

    statics: Map<string, unknown> = ...

    Values of the static fields, each set on first use.

    • Declares a field. Fails on a bad name or modifiers, or a field declared already.

      Parameters

      • declaration: string

        The name, with its modifiers before it.

      • body: Body

      Returns Result<void>

    • Declares a method or the constructor. Fails on a bad name, modifiers or params, or a method declared already.

      Parameters

      • declaration: string

        The name, with its modifiers before it.

      • params: (string | IParamData)[]
      • body: Body

      Returns Result<void>