Loading lib/jsduck/process/inherit_members.rb +1 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ module JsDuck # - :params # - :return # - :throws # - :properties # # In case of auto-detected members that inherit from a public # member in parent class, we inherit all fields that aren't Loading spec/aggregator_inheritdoc_spec.rb +24 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,30 @@ describe JsDuck::Aggregator do end end describe "@inheritdoc in @cfg with subproperties" do before do @docs = parse(<<-EOF) /** @class Foo */ /** * @cfg {Object} foo Original comment. * @cfg {String} foo.name Some name * @cfg {Number} foo.value Some value */ /** @class Inh1 */ /** * @cfg foo * @inheritdoc Foo#foo */ EOF @inh1 = @docs["Inh1"][:members][0] end it "inherits subproperties" do @inh1[:properties].length.should == 2 end end describe "@inheritdoc with type info" do before do @docs = parse(<<-EOF) Loading Loading
lib/jsduck/process/inherit_members.rb +1 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ module JsDuck # - :params # - :return # - :throws # - :properties # # In case of auto-detected members that inherit from a public # member in parent class, we inherit all fields that aren't Loading
spec/aggregator_inheritdoc_spec.rb +24 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,30 @@ describe JsDuck::Aggregator do end end describe "@inheritdoc in @cfg with subproperties" do before do @docs = parse(<<-EOF) /** @class Foo */ /** * @cfg {Object} foo Original comment. * @cfg {String} foo.name Some name * @cfg {Number} foo.value Some value */ /** @class Inh1 */ /** * @cfg foo * @inheritdoc Foo#foo */ EOF @inh1 = @docs["Inh1"][:members][0] end it "inherits subproperties" do @inh1[:properties].length.should == 2 end end describe "@inheritdoc with type info" do before do @docs = parse(<<-EOF) Loading