Loading lib/jsduck/merger.rb +1 −1 Original line number Diff line number Diff line Loading @@ -279,7 +279,7 @@ module JsDuck elsif code[:type] == :assignment && code[:right] if code[:right][:type] == :function return "Function" elsif code[:right][:type] == :literal elsif code[:right][:type] == :literal && code[:right][:class] != nil return code[:right][:class] end end Loading spec/aggregator_cfgs_and_properties_spec.rb +15 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,21 @@ describe JsDuck::Aggregator do it_should_behave_like "cfg or property default type" end describe "null @cfg" do before do @doc = parse(<<-EOS)[0] ({/** * @cfg * Some documentation. */ foo: null }) EOS end it_should_behave_like "cfg" it_should_behave_like "cfg or property" it_should_behave_like "cfg or property default type" end describe "typeless @property" do before do @doc = parse(<<-EOS)[0] Loading Loading
lib/jsduck/merger.rb +1 −1 Original line number Diff line number Diff line Loading @@ -279,7 +279,7 @@ module JsDuck elsif code[:type] == :assignment && code[:right] if code[:right][:type] == :function return "Function" elsif code[:right][:type] == :literal elsif code[:right][:type] == :literal && code[:right][:class] != nil return code[:right][:class] end end Loading
spec/aggregator_cfgs_and_properties_spec.rb +15 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,21 @@ describe JsDuck::Aggregator do it_should_behave_like "cfg or property default type" end describe "null @cfg" do before do @doc = parse(<<-EOS)[0] ({/** * @cfg * Some documentation. */ foo: null }) EOS end it_should_behave_like "cfg" it_should_behave_like "cfg or property" it_should_behave_like "cfg or property default type" end describe "typeless @property" do before do @doc = parse(<<-EOS)[0] Loading