Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MetadataUtils

Metadata args utility functions.

Hierarchy

  • MetadataUtils

Index

Methods

Static filterByTarget

  • filterByTarget<T>(array: T[], classes?: any[]): T[]
  • Filters given array of targets by a given classes. If classes are not given, then it returns array itself.

    Type parameters

    • T: object

    Parameters

    • array: T[]
    • Optional classes: any[]

    Returns T[]

Static getInheritanceTree

  • getInheritanceTree(entity: Function): Function[]
  • Gets given's entity all inherited classes. Gives in order from parents to children. For example Post extends ContentModel which extends Unit it will give [Unit, ContentModel, Post]

    Parameters

    • entity: Function

    Returns Function[]

Static isInherited

  • isInherited(target1: Function, target2: Function): boolean

Generated using TypeDoc