How to use the aurelia-metadata.Metadata.getOwn function in aurelia-metadata

To help you get started, we’ve selected a few aurelia-metadata examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aurelia / dependency-injection / dist / es6 / aurelia-dependency-injection.js View on Github external
_createConstructionInfo(fn) {
    let info = {activator: Metadata.getOwn(Metadata.instanceActivator, fn) || ClassActivator.instance};

    if (fn.inject !== undefined) {
      if (typeof fn.inject === 'function') {
        info.keys = fn.inject();
      } else {
        info.keys = fn.inject;
      }

      return info;
    }

    info.keys = Metadata.getOwn(Metadata.paramTypes, fn) || emptyParameters;
    return info;
  }
}
github aurelia / dependency-injection / dist / aurelia-dependency-injection.js View on Github external
var deco = function(target){
    target.inject = Metadata.getOwn(Metadata.paramTypes, target) || emptyParameters;
  };
github aurelia / dependency-injection / dist / es6 / aurelia-dependency-injection.js View on Github external
let deco = function(target) {
    target.inject = Metadata.getOwn(Metadata.paramTypes, target) || emptyParameters;
  };
github cmichaelgraham / aurelia-ts-port / aurelia-ts / dependency-injection / container.js View on Github external
createConstructionInfo(fn) {
        var info = { activator: Metadata.getOwn(Metadata.instanceActivator, fn) || ClassActivator.instance };
        if (fn.inject !== undefined) {
            if (typeof fn.inject === 'function') {
                info.keys = fn.inject();
            }
            else {
                info.keys = fn.inject;
            }
            return info;
        }
        if (this.locateParameterInfoElsewhere !== undefined) {
            info.keys = this.locateParameterInfoElsewhere(fn) || Reflect.getOwnMetadata(Metadata.paramTypes, fn) || emptyParameters;
        }
        else {
            info.keys = Reflect.getOwnMetadata(Metadata.paramTypes, fn) || emptyParameters;
        }
        return info;
github aurelia / dependency-injection / dist / aurelia-dependency-injection.js View on Github external
_createConstructionInfo(fn){
    var info = {activator: Metadata.getOwn(Metadata.instanceActivator, fn) || ClassActivator.instance};

    if(fn.inject !== undefined){
      if(typeof fn.inject === 'function'){
        info.keys = fn.inject();
      }else{
        info.keys = fn.inject;
      }

      return info;
    }

    info.keys = Metadata.getOwn(Metadata.paramTypes, fn) || emptyParameters;
    return info;
  }
}
github aurelia / dependency-injection / dist / aurelia-dependency-injection.js View on Github external
_createConstructionInfo(fn){
    var info = {activator: Metadata.getOwn(Metadata.instanceActivator, fn) || ClassActivator.instance};

    if(fn.inject !== undefined){
      if(typeof fn.inject === 'function'){
        info.keys = fn.inject();
      }else{
        info.keys = fn.inject;
      }

      return info;
    }

    info.keys = Metadata.getOwn(Metadata.paramTypes, fn) || emptyParameters;
    return info;
  }
}