Method: JsDuck::TypeParser#initialize

Defined in:
lib/jsduck/type_parser.rb

#initialize(relations = {}, formatter = {}) ⇒ TypeParser

Initializes the parser with hash of valid type names and doc_formatter.



54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/jsduck/type_parser.rb', line 54

def initialize(relations={}, formatter={})
  @relations = relations
  @formatter = formatter
  @primitives = {
    "boolean" => "Boolean",
    "number" => "Number",
    "string" => "String",
    "null" => "null",
    "undefined" => "undefined",
    "void" => "void",
  }
end