Loading lib/jsduck/merger.rb +2 −2 Original line number Diff line number Diff line Loading @@ -178,10 +178,10 @@ module JsDuck elsif doc_map[:type] doc_map[:type].first[:type] elsif code[:type] == :function :function "Function" elsif code[:type] == :assignment && code[:right] if code[:right][:type] == :function :function "Function" elsif code[:right][:type] == :literal code[:right][:class] end Loading test/tc_jsduck.rb +4 −0 Original line number Diff line number Diff line Loading @@ -462,6 +462,10 @@ this.locked = false; assert_equal("Boolean", docs[0][:type]) docs = JsDuck.parse(comment + "foo: false,") assert_equal("Boolean", docs[0][:type]) docs = JsDuck.parse(comment + "foo: function(){},") assert_equal("Function", docs[0][:type]) docs = JsDuck.parse(comment + "function foo(){},") assert_equal("Function", docs[0][:type]) end def test_visibility_modifiers Loading Loading
lib/jsduck/merger.rb +2 −2 Original line number Diff line number Diff line Loading @@ -178,10 +178,10 @@ module JsDuck elsif doc_map[:type] doc_map[:type].first[:type] elsif code[:type] == :function :function "Function" elsif code[:type] == :assignment && code[:right] if code[:right][:type] == :function :function "Function" elsif code[:right][:type] == :literal code[:right][:class] end Loading
test/tc_jsduck.rb +4 −0 Original line number Diff line number Diff line Loading @@ -462,6 +462,10 @@ this.locked = false; assert_equal("Boolean", docs[0][:type]) docs = JsDuck.parse(comment + "foo: false,") assert_equal("Boolean", docs[0][:type]) docs = JsDuck.parse(comment + "foo: function(){},") assert_equal("Function", docs[0][:type]) docs = JsDuck.parse(comment + "function foo(){},") assert_equal("Function", docs[0][:type]) end def test_visibility_modifiers Loading