Closed kimblim closed 4 years ago
Figured it out — all it took was for me to read the documentation regarding propFilter
and follow a link 🤦♂️
Anyways, here's a code snippet from my webpack.config.js, that works:
loader: 'react-docgen-typescript-loader', options: {
propFilter(prop) {
if (prop.parent) {
return !prop.parent.fileName.includes('node_modules')
}
return true
},
},
Is there any way to filter the props shown or only include the ones specifically defined in the interface, ie:
will (obviously) also show all the props that can be set on the
HTMLButtonElement
, but I would like if it only shows the five defined explicitly.