discordx
    Preparing search index...

    Function getLinkedObjects

    • Finds all decorators that are applied to the same location as a reference decorator.

      Decorators are considered "linked" when they are applied to the same class member:

      • Same class and same method/property for method/property decorators
      • Same class, same method, and same parameter position for parameter decorators

      Type Parameters

      Parameters

      • referenceDecorator: Decorator

        The decorator to find linked decorators for.

      • decoratorCollection: TDecorator[]

        The collection of decorators to search through.

      Returns TDecorator[]

      Array of decorators that are applied to the same location.

      // Method decorators - all linked together
      @Slash()
      @Permission()
      method() {}
      // Parameter decorators - each parameter position creates separate links
      method(
      @Option()
      @Required()
      param: string
      ) {}
      // Class decorators - linked to the class itself
      @Discord()
      @Injectable()
      class MyBot {}