Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore props & method extended to HTMLMotionProps<'div'> from framer-motion #469

Open
shaddamalbz opened this issue Jan 31, 2023 · 2 comments

Comments

@shaddamalbz
Copy link

Hi,
I want to exclude props & method, so it's only displayed a standard prop & method.
I have read and implement solution from #49 and it work if the interface is extending to HTMLAttibutes or ButtonHTMLAttributes but didn't work if the interface extending to HTMLMotionProps<'div'>, this is type from framer-motion

propsParser: require('react-docgen-typescript').withCustomConfig('./tsconfig.json', {
    propFilter(prop) {
      if (prop.parent) {
        return !prop.parent.fileName.includes('node_modules')
      }
      return true
    }
  }).parse,

interface (working)
image

interface (not working)
image

Result
image

is it possible to ignore this?

@Plane1005
Copy link

+1

@Plane1005
Copy link

I asked gpt and he told me that I can configure the shouldExtractLiteralValuesFromEnum attribute to true to solve this problem, but this method didn't work for me, you can try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants