Skip to content

Issues with parsing destructured import #44

Description

@kandji-joe

When using both the script and online tool, if I use a file with destructured prop-types the types that get generated are unknown.

For example:

import { bool, string } from 'prop-types'
...
Component.propTypes = { isDisabled: bool, name: string }

will generate

interface ComponentProps {
  isDisabled?: unknown;
  name?: unknown;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions