Loading lib/jsduck/merger.rb +2 −2 Original line number Diff line number Diff line Loading @@ -148,8 +148,8 @@ module JsDuck doc_map = build_doc_map(docs) return { :tagname => :property, :name => detect_name(:prop, doc_map, code), :type => detect_type(:prop, doc_map, code), :name => detect_name(:property, doc_map, code), :type => detect_type(:property, doc_map, code), :doc => detect_doc(docs), :private => !!doc_map[:private], :static => !!doc_map[:static], Loading test/tc_jsduck.rb +13 −1 Original line number Diff line number Diff line Loading @@ -394,7 +394,19 @@ foo: true, assert_equal("Boolean", docs[0][:type]) end def test_property def test_explicit_property docs = JsDuck.parse(" /** * @property {Integer} foo My comment */ ") assert_equal(:property, docs[0][:tagname]) assert_equal("foo", docs[0][:name]) assert_equal("Integer", docs[0][:type]) assert_equal("My comment", docs[0][:doc]) end def test_property_with_type docs = JsDuck.parse(" /** * @property Loading Loading
lib/jsduck/merger.rb +2 −2 Original line number Diff line number Diff line Loading @@ -148,8 +148,8 @@ module JsDuck doc_map = build_doc_map(docs) return { :tagname => :property, :name => detect_name(:prop, doc_map, code), :type => detect_type(:prop, doc_map, code), :name => detect_name(:property, doc_map, code), :type => detect_type(:property, doc_map, code), :doc => detect_doc(docs), :private => !!doc_map[:private], :static => !!doc_map[:static], Loading
test/tc_jsduck.rb +13 −1 Original line number Diff line number Diff line Loading @@ -394,7 +394,19 @@ foo: true, assert_equal("Boolean", docs[0][:type]) end def test_property def test_explicit_property docs = JsDuck.parse(" /** * @property {Integer} foo My comment */ ") assert_equal(:property, docs[0][:tagname]) assert_equal("foo", docs[0][:name]) assert_equal("Integer", docs[0][:type]) assert_equal("My comment", docs[0][:doc]) end def test_property_with_type docs = JsDuck.parse(" /** * @property Loading