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

v3.0.2 TypeScript error about missing properties #82

Closed
StefanoSega opened this issue Apr 9, 2019 · 2 comments
Closed

v3.0.2 TypeScript error about missing properties #82

StefanoSega opened this issue Apr 9, 2019 · 2 comments

Comments

@StefanoSega
Copy link

I've all my dependencies updated to the latest versions (react-placeholder, typescript, tslint, ...) and only since the last npm i I ran I get this error on all the jsx instances of ReactPlaceholder:

(alias) class ReactPlaceholder
import ReactPlaceholder

Type '{ children: Element; type: "text"; rows: number; ready: boolean; showLoadingAnimation: true; className: any; }' is missing the following properties from type 'Pick<Pick<(Readonly<CommonProps & { type: "rect" | "text" | "media" | "textRow" | "round"; rows?: number; color?: string; showLoadingAnimation?: boolean; customPlaceholder?: undefined; }> & Readonly<...>) | (Readonly<...> & Readonly<...>), "children" | ... 9 more ... | "customPlaceholder"> & Pick<...> & Pick<...>, "...': style, firstLaunchOnly, customPlaceholder

ts(2739)

an example of one of my components it's like:

<ReactPlaceholder
      type="text"
      rows={1}
      ready={ready}
      showLoadingAnimation
      className={styles.labelFieldPlaceholder}
    >
      <div className={classNames(styles.labelField, className)}>
        Test
      </div>
    </ReactPlaceholder>

this TS error is a blocker e.g. Jest would break

@StefanoSega
Copy link
Author

firstLaunchOnly, style and customPlaceholder are now mandatory?
Why?

@BrianMitchL
Copy link
Contributor

This should be fixed with v4.

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