Loading lib/jsduck/cfg_table.rb +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ module JsDuck end def signature_suffix(item) " : " + (item[:type] || "Object") " : " + item[:type] end end Loading lib/jsduck/merger.rb +4 −0 Original line number Diff line number Diff line Loading @@ -184,7 +184,11 @@ module JsDuck "Function" elsif code[:right][:type] == :literal code[:right][:class] else "Object" end else "Object" end end Loading lib/jsduck/property_table.rb +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ module JsDuck end def signature_suffix(item) " : " + (item[:type] || "Object") " : " + item[:type] end end Loading test/tc_jsduck.rb +18 −0 Original line number Diff line number Diff line Loading @@ -468,6 +468,24 @@ this.locked = false; assert_equal("Function", docs[0][:type]) end def test_default_property_type_is_object docs = JsDuck.parse(" /** * @property foo */ ") assert_equal("Object", docs[0][:type]) end def test_default_cfg_type_is_object docs = JsDuck.parse(" /** * @cfg foo */ ") assert_equal("Object", docs[0][:type]) end def test_visibility_modifiers ["@private", "@hide", "@ignore", "@protected"].each do |tagname| docs = JsDuck.parse("/**\n * #{tagname}\n */"); Loading Loading
lib/jsduck/cfg_table.rb +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ module JsDuck end def signature_suffix(item) " : " + (item[:type] || "Object") " : " + item[:type] end end Loading
lib/jsduck/merger.rb +4 −0 Original line number Diff line number Diff line Loading @@ -184,7 +184,11 @@ module JsDuck "Function" elsif code[:right][:type] == :literal code[:right][:class] else "Object" end else "Object" end end Loading
lib/jsduck/property_table.rb +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ module JsDuck end def signature_suffix(item) " : " + (item[:type] || "Object") " : " + item[:type] end end Loading
test/tc_jsduck.rb +18 −0 Original line number Diff line number Diff line Loading @@ -468,6 +468,24 @@ this.locked = false; assert_equal("Function", docs[0][:type]) end def test_default_property_type_is_object docs = JsDuck.parse(" /** * @property foo */ ") assert_equal("Object", docs[0][:type]) end def test_default_cfg_type_is_object docs = JsDuck.parse(" /** * @cfg foo */ ") assert_equal("Object", docs[0][:type]) end def test_visibility_modifiers ["@private", "@hide", "@ignore", "@protected"].each do |tagname| docs = JsDuck.parse("/**\n * #{tagname}\n */"); Loading