Skip to content

Commit 8948055

Browse files
devversionmmalerba
authored andcommitted
build: inherited members not showing up in API docs (#18089)
d2ea0b8 switched `Object.assign` to a spread assignment in the `MergeInheritedProperties` processor. This broke the cloning of member Dgeni documents and caused the inherited members to not show up in the API docs. https://next.material.angular.io/components/button/api. Notice that no inputs like `color` and `disabled` are shown.
1 parent 4318410 commit 8948055

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/dgeni/processors/merge-inherited-properties.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export class MergeInheritedProperties implements Processor {
3535
// member doc for the destination class, we clone the member doc. It's important to keep
3636
// the prototype and reference because later, Dgeni identifies members and properties
3737
// by using an instance comparison.
38-
const newMemberDoc = {...Object.create(memberDoc), ...memberDoc};
38+
// tslint:disable-next-line:ban Need to use Object.assign to preserve the prototype.
39+
const newMemberDoc = Object.assign(Object.create(memberDoc), memberDoc);
3940
newMemberDoc.containerDoc = destination;
4041

4142
destination.members.push(newMemberDoc);

0 commit comments

Comments
 (0)