Skip to content

Commit c7e6d8a

Browse files
committed
docs(changeset): Added the ability to 'ignore' a property to avoid the missing converter error. To ignore a property add a comment above the prop and prefix it with @ert-ignore.
1 parent a297be0 commit c7e6d8a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/wise-bulldogs-repeat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'extract-react-types': minor
3+
---
4+
5+
Added the ability to 'ignore' a property to avoid the missing converter error. To ignore a property add a comment above the prop and prefix it with @ert-ignore.

packages/extract-react-types/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,7 @@ function convert(path, context) {
15351535
let converter = converters[path.type];
15361536

15371537
if (!converter) {
1538-
const propertySignature = path.find(p => p.isTSPropertySignature());
1538+
const propertySignature = path.find(p => p.isTSPropertySignature() || p.isObjectTypeProperty());
15391539
if (propertySignature && propertySignature.node) {
15401540
const leadingComments = propertySignature.node.leadingComments || [];
15411541
const leadingComment = leadingComments.reduce((accum, comment) => accum + comment.value, '');

0 commit comments

Comments
 (0)