Adds a type id/constructor function mampping to the `typeMap`.
@method registerType
@param {string} typeId The type id.
@param {function} constructor The constructor.
184466
function() {
            var first = arguments[0];

            if (arguments.length == 1) {
                var id = first[this.typeAttribute] || system.getModuleId(first);
                this.typeMap[id] = first;
            } else {
                this.typeMap[first] = arguments[1];
            }
        }
1049165
private void register(Class<? extends YamlNode> type, Represent represent) {
        this.representers.put(type, represent);
        this.multiRepresenters.put(type, represent);
    }
776334
public void registerType(ModelElementType modelElementType, Class<? extends ModelElementInstance> instanceType) {
    QName qName = ModelUtil.getQName(modelElementType.getTypeNamespace(), modelElementType.getTypeName());
    typesByName.put(qName, modelElementType);
    typesByClass.put(instanceType, modelElementType);
  }
528200
function addTypeListener(emitter, type, event, listener) {
    if (!emitter._listeners) {
        emitter._listeners = {
            on: {},
            after: {},
            before: {}
        };
    }

    if (!emitter._listeners[type][event]) {
        emitter._listeners[type][event] = [];
    }
    if ('on' == type && emitter._listeners[type][event].length) {
        throw Error('Listener for event "' + event + '" already defined.');
    }

    emitter._listeners[type][event].push(listener);

    return function remove() {
        const index = emitter._listeners[type][event].indexOf(listener);
        if (-1 !== index) {
            emitter._listeners[type][event].splice(index, 1);
        }
    };
}
1224106
public static void addPropertyId(
        CmsCmisTypeManager typeManager,
        PropertiesImpl props,
        String typeId,
        Set<String> filter,
        String id,
        String value) {

        if (!checkAddProperty(typeManager, props, typeId, filter, id)) {
            return;
        }
        PropertyIdImpl result = new PropertyIdImpl(id, value);
        result.setQueryName(id);

        props.addProperty(result);
    }
1110904
private static String createTypeId(Type type) {
        if (type instanceof Class<?>)
            return Class.class.cast(type).getName();

        if (type instanceof ParameterizedType)
            return createTypeId(((ParameterizedType) type).getRawType())
                + Stream.of(((ParameterizedType) type).getActualTypeArguments())
                .map(CdiSpiHelper::createTypeId)
                .collect(joining(",", "<", ">"));

        if (type instanceof TypeVariable<?>)
            return TypeVariable.class.cast(type).getName();

        if (type instanceof GenericArrayType)
            return createTypeId(GenericArrayType.class.cast(type).getGenericComponentType());

        throw new UnsupportedOperationException("Unable to create type id for type [" + type + "]");
    }
118998
function(type)
	{
		this.preinitialize.apply(this, arguments);
		
		if (conbo.isString(type)) 
		{
			this.type = type;
		}
		else 
		{
			conbo.defineDefaults(this, type);
		}
		
		if (!this.type) 
		{
			throw new Error('Invalid or undefined event type');
		}
		
		this.initialize.apply(this, arguments);
	}
619316
function Emitter(constructor) {
  if("function" == typeof constructor) {
    constructor(emit)
  }else{
    constructor = null
  }
  
  var listeners = []

  // emitter(listener:Function) -> removeListener:Function
  // emitter() -> emitter:function
  var emitter = function (listener) {
    // emitter() -> emitter:function
    if(!listener) {
      return emitter
    }
    // emitter(listener:Function) -> removeListener:Function
    if("function" !== typeof listener) {
      throw new Error('Listener must be a function')
    }
    var newLength = listeners.push(listener)
      , index = newLength-1
      , removed = false
    
    return function removeListener() {
      if(removed) return
      removed = true
      listeners.splice(index, 1)
    }
  }
  
  if(!constructor) {
    // emitter.emit(args...)
    emitter.emit = emit
  }
  
  return emitter
  
  function emit() {
    var args = arguments
    listeners.forEach(function(listener) {
      listener.apply(null, args)
    })
  }
}
1360867
function(id, constructor, superklass) {
    if (superklass) {
      var ctor           = function() {};
          ctor.prototype = superklass.prototype;

      constructor.prototype = new ctor();
    }

    constructor.prototype.constructor = constructor;

    return constructor;
  }
721783
function register(type, name, create) {
		if (!(type in definitions)) {
			definitions[type] = {};
		}

		if (type === 'pipe') {
			create = chain(create, devour);
		}

		definitions[type][name] = create;
	}
52271
function construct (constructor, args) {
  function Factory () {
    return constructor.apply(this, args);
  }

  Factory.prototype = constructor.prototype;

  return new Factory();
}
308597
public void put(TypeMap<?, ?> typeMap) {
    TypePair<?, ?> typePair = TypePair.of(typeMap.getSourceType(),
        typeMap.getDestinationType(), typeMap.getName());
    synchronized (lock) {
      if (typeMaps.containsKey(typePair))
        throw new IllegalArgumentException("TypeMap exists in the store: " + typePair.toString());
      typeMaps.put(typePair, typeMap);
    }
  }
327781
public static <T> void registerReader(Class<T> type, JsonReaderI<T> mapper) {
		defaultReader.registerReader(type, mapper);
	}
400258
private static void _registerTypeMapping(WSServer server, Class clazz) {
	if (clazz == null) return;

	if (!isComplexType(clazz)) {
	    if (clazz.isArray()) {
		_registerTypeMapping(server, clazz.getComponentType());
	    }
	    return;
	}
	server.registerTypeMapping(clazz);
	registerTypeMapping(server, clazz);
    }
816466
function build() {
    // Start creating the body of the new Type constructor, first calling super()
    var _ret = buildIdentity.call(this);
    var typeId = _ret.typeId;
    var typeName = _ret.typeName;
    var body =
        '\tvar opts = options ? options : {};\n' +
        '\tthis.constructor.util._extend(this, opts.props);\n' +
        '\tthis.constructor.super_.call(this, opts.buffer, opts.offset' +
        (typeId ? '' : ', true') +
        ');\n';
    // Init fields
    body += _ret.body;
    body += buildSerialize.call(this);
    body += buildDeserialize.call(this);
    // Add to body all the read/write methods
    for (var i = 0; i < this._methods.length; i++) {
        body += this._methods[i];
    }
    if (logger.isDebugEnabled()) {
        logger.debug('Body for %s type constructor:', typeName);
        logger.debug('\n' + body);
    }
    return createConstructor(body, typeId, typeName);
}
537442
function add({
  id, path, types: t, key, value,
}) {
  const programPath = path.findParent(p => p.isProgram());
  const keyMapNode = getKeyMapNode({ id, programPath, types: t });

  keyMapNode.properties.push(t.objectProperty(
    t.identifier(key), t.stringLiteral(value),
  ));
}
1291351
function create(type, constructor) {
  return function scale() {
    var s = constructor();

    if (!s.invertRange) {
      s.invertRange = s.invert ? invertRange(s)
        : s.invertExtent ? invertRangeExtent(s)
        : undefined;
    }

    s.type = type;
    return s;
  };
}