discordx
    Preparing search index...

    Class DGuard

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _methodReference?: Record<string, any>
    _parameterIndex?: number
    _propertyName: string
    _sourceClass: Record<string, any>
    _targetClass: Record<string, any>

    Accessors

    • get classRef(): Record<string, any>

      The class constructor where this decorator was applied.

      Returns Record<string, any>

    • set classRef(value: Record<string, any>): void

      Parameters

      • value: Record<string, any>

      Returns void

    • get from(): Record<string, any>

      The original class where the decoration was first applied. May differ from classRef in inheritance scenarios.

      Returns Record<string, any>

    • set from(value: Record<string, any>): void

      Parameters

      • value: Record<string, any>

      Returns void

    • get index(): undefined | number

      The zero-based index of the parameter being decorated (parameter decorators only).

      Returns undefined | number

    • get isClass(): boolean

      Determines if this decorator was applied to a class constructor.

      Returns boolean

    • get key(): string

      The name of the property or method being decorated.

      Returns string

    • get method(): undefined | Record<string, any>

      The actual method function reference (for method decorators).

      Returns undefined | Record<string, any>

    Methods

    • Automatically detects the decoration target type and applies appropriate metadata.

      This method handles the complexity of TypeScript's decorator signatures and normalizes them into a consistent internal representation.

      Parameters

      • classConstructor: Record<string, any>

        The class constructor

      • OptionalpropertyKey: string

        Property/method name (undefined for class decorators)

      • OptionalmethodDescriptor: PropertyDescriptor

        Method descriptor (undefined for parameter decorators)

      • OptionalparameterIndex: number

        Parameter index (undefined for class/method decorators)

      Returns this

      This instance for method chaining

    • Manually sets all metadata properties for this decorator.

      Parameters

      • targetClass: Record<string, any>

        The class being decorated

      • propertyName: string

        The property/method name

      • OptionalmethodRef: Record<string, any>

        The method function reference

      • OptionalsourceClass: Record<string, any>

        The originating class (defaults to targetClass)

      • OptionalparameterIndex: number

        The parameter position

      Returns this

      This instance for method chaining