TypeSystemDefinition
340548
def parse_type_system_definition(lexer: Lexer) -> Node:
    """"""
    # Many definitions begin with a description and require a lookahead.
    keyword_token = lexer.lookahead() if peek_description(lexer) else lexer.token
    func = _parse_type_system_definition_functions.get(cast(str, keyword_token.value))
    if func:
        return func(lexer)
    raise unexpected(lexer, keyword_token)
984529
function _gpfDefineInterface(name, definition) {
        var interfaceDefinition = { $interface: "gpf.interfaces.I" + name };
        Object.keys(definition).forEach(function (methodName) {
            interfaceDefinition[methodName] = _gpfCreateAbstractFunction(definition[methodName]);
        });
        return _gpfDefine(interfaceDefinition);
    }
705853
private FieldDefinition declareTypeField()
    {
        FieldDefinition typeField = new FieldDefinition(a(PRIVATE, FINAL), "type", type(ThriftType.class));
        classDefinition.addField(typeField);

        // add constructor parameter to initialize this field
        parameters.add(typeField, ThriftType.struct(metadata));

        return typeField;
    }
1102516
def definitions_for_types(types)
      definitions = []

      # There are basically two type signatures: either the name(s) of a
      # constant or a method in the form of `#method_name`.
      types.each do |type|
        if type[0] == '#'
          found = create_unknown_with_method(type[1..-1])
        else
          found = lookup_type_definition(type)
        end

        definitions << found if found
      end

      return definitions
    end
962448
function(type) {
        var namespaces = emberA(Namespace.NAMESPACES), types = emberA(), self = this;
        var typeSuffixRegex = new RegExp(classify(type) + "$");

        namespaces.forEach(function(namespace) {
          if (namespace !== Ember) {
            for (var key in namespace) {
              if (!namespace.hasOwnProperty(key)) { continue; }
              if (typeSuffixRegex.test(key)) {
                var klass = namespace[key];
                if (typeOf(klass) === 'class') {
                  types.push(dasherize(key.replace(typeSuffixRegex, '')));
                }
              }
            }
          }
        });
        return types;
      }
496619
function (type, name) {
      var suffix = _emberRuntimeSystemString.classify(type);
      var namePrefix = name.slice(0, suffix.length * -1);
      var dasherizedName = _emberRuntimeSystemString.dasherize(namePrefix);

      return type + ':' + dasherizedName;
    }
525201
function define() {
    var type = this.data.type || this.defaults.type;

    //
    // If not production use development keys.
    //
    if (process.env.NODE_ENV !== 'production') this.data.key = this[type];

    //
    // Remove unneeded static libraries, always keep Cortex.JS
    //
    this.js = this.js.filter(function filter(file) {
      return ~file.indexOf('analytics/base.js') || ~file.indexOf('static/' + type);
    });

    return this;
  }
179076
function define (File, utils) {
  const { debug, error, strong } = utils.cnsl;
  const { sourceMapCommentStrip } = utils.string;

  return class TYPESCRIPTFile extends File {
    /**
     * Compile file contents
     * @param {Object} buildOptions
     *  - {Boolean} batch
     *  - {Boolean} bootstrap
     *  - {Boolean} boilerplate
     *  - {Boolean} browser
     *  - {Boolean} bundle
     *  - {Boolean} compress
     *  - {Array} ignoredFiles
     *  - {Boolean} helpers
     *  - {Boolean} watchOnly
     * @param {Function} fn(err)
     * @returns {null}
     */
    compile (buildOptions, fn) {
      try {
        const compilerOptions = Object.assign(
          this.hasMaps ? { sourceMap: true, inlineSourceMap: false } : {},
          DEFAULT_COMPILER_OPTIONS,
          (this.options.pluginOptions.typescript && this.options.pluginOptions.typescript.compilerOptions) || {}
        );
        const options = {
          fileName: this.relpath,
          compilerOptions
        };
        const result = ts.transpileModule(this.content, options);

        this.setContent(sourceMapCommentStrip(result.outputText));
        if (result.sourceMapText) this.setMap(result.sourceMapText);
        debug(`compile: ${strong(this.relpath)}`, 4);
      } catch (err) {
        if (!this.options.runtimeOptions.watch) return fn(err);
        error(err, 4, false);
      }
      fn();
    }
  };
}
580949
private void defineGetTypeMethod()
    {
        classDefinition.addMethod(
                new MethodDefinition(a(PUBLIC), "getType", type(ThriftType.class))
                        .loadThis()
                        .getField(codecType, typeField)
                        .retObject()
        );
    }
55427
def types(self):
        """"""
        return [term for term in self._terms
                if isinstance(term, (TypeIdentifier, String, Regex))]
547919
function(types, options){
			if(!Array.isArray(types)) {
				return options.inverse(this);
			}
			var typesWithDescriptions = [];
			types.forEach(function( type ){
				if(type.description){
					typesWithDescriptions.push(type)
				}
			});
			
			if( !typesWithDescriptions.length ) {
				// check the 1st one's options
				if(types.length == 1 && types[0].options ) {
					types[0].options.forEach(function(option){
						typesWithDescriptions.push(option);
					});
				}
				
			}
			
			if(typesWithDescriptions.length){
				return options.fn({types: typesWithDescriptions});
			} else {
				return options.inverse(this);
			}
		}
133275
function Type(name, super_types, fs) {
  this.super_types = [];
  this.name = name;
  if (super_types) {
    this.super_types = super_types;
  }
  this.fs = fs;
}
580039
def define(self):
        
        self.collections = []

        self.camera_collection = \
            SimpleCollection(filename=os.path.join(self.directory, "devices.dat"),
                             row_classes=[
                DataModel.EmptyRow,
                DataModel.RTSPCameraRow,
                DataModel.USBCameraRow
            ]
            )
        self.collections.append(self.camera_collection)

        self.config_collection = \
            SimpleCollection(filename=os.path.join(self.directory, "config.dat"),
                             row_classes=[  # we could dump here all kinds of info related to different kind of configuration forms
                DataModel.MemoryConfigRow
            ]
            )
        self.collections.append(self.config_collection)
623512
function typeIs(object, types) {

	var type = typeOf(object);
	var _types = types;

	if (arguments.length === 2 && typeof types === 'string') {
		return type === types;
	} else if (!_isArray(types) && arguments.length > 2) {
		_types = Array.prototype.slice.call(arguments, 1);
	}

	return Array.has(_types, type);
}
1294227
def register_type(cls, name):
    """"""
    x = TypeDefinition(name, (cls,), ())
    Validator.types_mapping[name] = x
1323952
function defineOnPrototype(ctor, methods) {
  var proto = ctor.prototype;
  forEachProperty(methods, function(val, key) {
    proto[key] = val;
  });
}
404931
function definePrototyper() {
	
	//
	// CONSTRUCTOR
	//
	
	define(ProtoTyper);
	
	// STATIC CONSTANTES
	
	isConstante('CHANGE', 'propertyChange');
	
	//
	// PROTOTYPE
	//
	
	define(ProtoTyper.prototype)
	
	// MAIN
	
	isConstante('define', define);
	isConstante('d', define);
	
	
	// EVENT PROXY
	
	// TODO isProperty('eventMethod', setEventMethod);
	
	
	// PROPERTIES
	
	isConstante('const', isConstante);
	isConstante('c', isConstante);
	
	isConstante('property', isProperty);
	isConstante('p', isProperty);
	
	isConstante('user', isUser);
	isConstante('u', isUser);
	
	
	// OPTIONS
	
	isConstante('type', hasType);
	isConstante('t', hasType);
	
	isConstante('event', hasEvent);
	isConstante('e', hasEvent);
	
	isUser('nokey', generateTagGetter(isNotkey));
	isUser('nk', generateTagGetter(isNotkey));
	
	isUser('final', generateTagGetter(isFinal));
	isUser('f', generateTagGetter(isFinal));
}