Skip to content

Commit

Permalink
Remove non-type conformant summary code
Browse files Browse the repository at this point in the history
See conversation here: #19919 (comment)
  • Loading branch information
tmeasday committed Nov 24, 2022
1 parent 30aa0b1 commit 35b82d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,6 @@ describe('angular source decorator', () => {
name: 'enum',
required: true,
value: [],
// Not allowed on the type
// summary: 'ButtonAccent',
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ const createAngularInputProperty = ({
value: any;
argType?: ArgTypes[string];
}) => {
// @ts-expect-error summary is not on the type, but it may be there in practice, need to find out
const { name: type = null, summary = null } =
(typeof argType?.type === 'object' && argType?.type) || {};
const { name: type = null } = (typeof argType?.type === 'object' && argType?.type) || {};
let templateValue = type === 'enum' && !!summary ? `${summary}.${value}` : value;

const actualType = type === 'enum' && summary ? 'enum' : typeof value;
Expand Down

0 comments on commit 35b82d6

Please sign in to comment.