_Type :: ... -> Type
437958
function _Type(
    type,       // :: String
    name,       // :: String
    url,        // :: String
    arity,      // :: NonNegativeInteger
    format,
    // :: Nullable ((String -> String, String -> String -> String) -> String)
    supertypes, // :: Array Type
    test,       // :: Any -> Boolean
    tuples      // :: Array (Array3 String (a -> Array b) Type)
  ) {
    var t = Object.create (Type$prototype);
    t._test = test;
    t._extractors = tuples.reduce (function(_extractors, tuple) {
      _extractors[tuple[0]] = tuple[1];
      return _extractors;
    }, {});
    t.arity = arity;  // number of type parameters
    t.extractors = Z.map (B (toArray), t._extractors);
    t.format = format || function(outer, inner) {
      return Z.reduce (function(s, tuple) {
        return s +
               outer (' ') +
               when (tuple[2].arity > 0)
                    (parenthesize (outer))
                    (inner (tuple[0]) (show (tuple[2])));
      }, outer (name), tuples);
    };
    t.keys = tuples.map (function(tuple) { return tuple[0]; });
    t.name = name;
    t.supertypes = supertypes;
    t.type = type;
    t.types = tuples.reduce (function(types, tuple) {
      types[tuple[0]] = tuple[2];
      return types;
    }, {});
    t.url = url;
    return t;
  }
1232556
def match_type?(object)
            result = object.kind_of_any? self.type_classes
            if not result
                result = object.type_of_any? self.type_types
            end
            
            return result
        end
1276494
def is_string_type(type_):
    

    string_types = _get_types(Types.STRING)
    if is_typing_type(type_):
        return type_ in string_types or is_regex_type(type_)
    return type_ in string_types
748782
def _get_types(type_):
    

    return list(
        itertools.chain.from_iterable(
            map(lambda x: TYPE_MAPPINGS[x].get(type_, []), TYPE_MAPPINGS)
        )
    )
1371406
def call(value, type)
      return type.call(value) if type.respond_to?(:call)

      self[type].call(value)
    end
833116
public function type($mapping_type) {
		$args = func_get_args();
		$mapping_type = array_shift($args);
	
		//check if mapping arguments are defined
		if (empty($args))
			return $this->merge(['map.type' => $mapping_type]);
	
		return $this->merge(['map.type' => $mapping_type, 'map.params' => $args]);
	}
646087
function withTypeChecking(
    env,            // :: Array Type
    typeInfo,       // :: TypeInfo
    impl            // :: Function
  ) {
    var n = typeInfo.types.length - 1;

    //  wrapFunctionCond :: (TypeVarMap, Integer, a) -> a
    function wrapFunctionCond(_typeVarMap, index, value) {
      var expType = typeInfo.types[index];
      if (expType.type !== FUNCTION) return value;

      //  checkValue :: (TypeVarMap, Integer, String, a) -> Either (() -> Error) TypeVarMap
      function checkValue(typeVarMap, index, k, x) {
        var propPath = [k];
        var t = expType.types[k];
        return (
          t.type === VARIABLE ?
            Z.chain (
              function(typeVarMap) {
                return isEmpty (typeVarMap[t.name].types) ?
                  Left (function() {
                    return typeVarConstraintViolation (
                      env,
                      typeInfo,
                      index,
                      propPath,
                      typeVarMap[t.name].valuesByPath
                    );
                  }) :
                  Right (typeVarMap);
              },
              Right (updateTypeVarMap (env,
                                       typeVarMap,
                                       t,
                                       index,
                                       propPath,
                                       [x]))
            ) :
          // else
            Z.map (
              function(r) { return r.typeVarMap; },
              satisfactoryTypes (env,
                                 typeInfo,
                                 typeVarMap,
                                 t,
                                 index,
                                 propPath,
                                 [x])
            )
        );
      }

      var typeVarMap = _typeVarMap;
      return function(x) {
        if (arguments.length !== expType.arity - 1) {
          throw invalidArgumentsLength (typeInfo,
                                        index,
                                        expType.arity - 1,
                                        slice.call (arguments));
        }

        var args = arguments;
        typeVarMap = assertRight (
          (init (expType.keys)).reduce (function(either, k, idx) {
            var arg = args[idx];
            return Z.chain (function(typeVarMap) {
              return checkValue (typeVarMap, index, k, arg);
            }, either);
          }, Right (typeVarMap))
        );

        var output = value.apply (this, arguments);
        var k = last (expType.keys);
        typeVarMap = assertRight (checkValue (typeVarMap, index, k, output));
        return output;
      };
    }

    //  wrapNext :: (TypeVarMap, Array Any, Integer) -> (a -> b)
    function wrapNext(_typeVarMap, _values, index) {
      return function(x) {
        var args = slice.call (arguments);
        if (args.length !== 1) {
          throw invalidArgumentsCount (typeInfo, index, 1, args);
        }
        var typeVarMap = (assertRight (
          satisfactoryTypes (env,
                             typeInfo,
                             _typeVarMap,
                             typeInfo.types[index],
                             index,
                             [],
                             args)
        )).typeVarMap;

        var values = Z.concat (_values, args);
        if (index + 1 === n) {
          var value = values.reduce (function(f, x, idx) {
            return f (wrapFunctionCond (typeVarMap, idx, x));
          }, impl);
          typeVarMap = (assertRight (
            satisfactoryTypes (env,
                               typeInfo,
                               typeVarMap,
                               typeInfo.types[n],
                               n,
                               [],
                               [value])
          )).typeVarMap;
          return wrapFunctionCond (typeVarMap, n, value);
        } else {
          return wrapNext (typeVarMap, values, index + 1);
        }
      };
    }

    var wrapped = typeInfo.types[0].type === NO_ARGUMENTS ?
      function() {
        if (arguments.length !== 0) {
          throw invalidArgumentsCount (typeInfo, 0, 0, slice.call (arguments));
        }
        var value = impl ();
        var typeVarMap = (assertRight (
          satisfactoryTypes (env,
                             typeInfo,
                             {},
                             typeInfo.types[n],
                             n,
                             [],
                             [value])
        )).typeVarMap;
        return wrapFunctionCond (typeVarMap, n, value);
      } :
      wrapNext ({}, [], 0);

    wrapped[inspect] = wrapped.toString = always0 (typeSignature (typeInfo));

    return wrapped;
  }
1072089
def types_validation!(value)
      raise ValidationError if types && types.none? { |type| type === value }
    end
930983
def p_ref_type(self, p):
        ''''''
        p[0] = ast.DefinedType(p[1], lineno=p.lineno(1))
290862
def set_type(self,type):
    
    self.add_var_opt('type',str(type))
    self.__type = str(type)
    self.__set_output()
1079102
def target_by_type(type)
      result = []
      @relationship.each do |cur_rels|
        result << cur_rels.target if cur_rels.type.include?(type)
      end
      result
    end
92184
def type_in(type_s, el, args = {})
      extra_keys = args[:extra_keys] || [:enter]
      el = find_by_id("#{el}") if el.is_a? String
      el.native.clear()
      type_s.each_char do |key|
        el.native.send_keys(key)
      end
      el.send_keys(extra_keys)
    end
1163629
function(type){
            type = this.string(type);
            if(types.indexOf(type.toLowerCase()) < 0){
                throw new TypeError('a type in [' + types.join(', ') + '] is expected, but ' + type + ' given');
            }
            return type.toLowerCase();
        }
719864
def _handle_type(self, other):
        """"""
        if isinstance(other, Int):
            return Int
        elif isinstance(other, Float):
            return Float
        else:
            raise TypeError(
                f"Unsuported operation between `{type(self)}` and `{type(other)}`."
            )
1326503
def is_type(type_, *p):
    
    try:
        for i in p:
            if i.type_ != type_:
                return False

        return True
    except:
        pass

    return False
169146
function maybe_type() {
  skip_horiz_white();
  if (look(/\{/)) {
    var tdf = typedef();
    current_tag["type"] = tdf["type"];
    current_tag["optional"] = tdf["optional"] ? true : false;
  }
}
841615
function _type(chunk, test) {
  var b = chunk[0];
  if(b === ERR || b === BST || b === STR || b === INT || b === ARR) {
    if(!test) this._offset++;
    return b;
  }
}