Skip to content
This repository was archived by the owner on Apr 1, 2023. It is now read-only.
This repository was archived by the owner on Apr 1, 2023. It is now read-only.

No Prop Hints using index.es.js #157

@kaijchang

Description

@kaijchang

When I use the typescript starter and I import it, the imported components don't have typehints for the props. They only have typehints if I import them from react-library-name/dist/index.

Activity

kaijchang

kaijchang commented on Jun 10, 2019

@kaijchang
Author

this is on webstorm

kaijchang

kaijchang commented on Jun 10, 2019

@kaijchang
Author

I found this library: https://github.com/joelday/ts-proptypes-transformer
I'm trying to use it as a transformer with the typescript plugin:

import proptypes from 'ts-proptypes-transformer'

...

typescript({
  rollupCommonJSResolveHack: true,
  clean: true,
  transformers: [service => ({
    before: [],
    after: [proptypes(service.getProgram())]
  })]
}),

I know this is pretty out of scope for this project, but I wonder if anyone knows how to fix the error I get:

[!] (rpt2 plugin) TypeError: Cannot read property 'kind' of undefined
src/index.tsx
TypeError: Cannot read property 'kind' of undefined
transitive-bullshit

transitive-bullshit commented on Mar 31, 2020

@transitive-bullshit
Owner

This should be fixed now with the latest v3 release.

Please open a new issue if you're still seeing errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @transitive-bullshit@kaijchang

        Issue actions

          No Prop Hints using index.es.js · Issue #157 · transitive-bullshit/create-react-library