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

TypeScript: Region component not found #410

Closed
lianghan-ihealth opened this issue Feb 6, 2018 · 4 comments
Closed

TypeScript: Region component not found #410

lianghan-ihealth opened this issue Feb 6, 2018 · 4 comments
Labels

Comments

@lianghan-ihealth
Copy link

Region component not in the d.ts. I can not use it

@fahad19 fahad19 changed the title Region component not found TypeScript: Region component not found Feb 6, 2018
@fahad19 fahad19 added the bug label Feb 6, 2018
@lianghan-ihealth
Copy link
Author

thank you!please as soon as possible

@fahad19
Copy link
Member

fahad19 commented Feb 7, 2018

@JackTheRipper: is it possible for you to take a look at it? =D

@markvincze: for the short-term gain, ca we suggest applying any TypeScript trick so that Region component can be imported without having to modify the monorepo's typings?

@fahad19
Copy link
Member

fahad19 commented Feb 7, 2018

@lianghan-ihealth: until we have our next release with updated typings, may be you can try this locally:

declare module 'frint-react' {
  interface RegionProps {
    name: string;
    uniqueKey?: string;
    data?: any;
  }

  class Region extends React.Component<RegionProps, any> {  
  }
}

Following what's written in this blog post: https://templecoding.com/blog/2016/03/31/creating-typescript-typings-for-existing-react-components/

@lianghan-ihealth
Copy link
Author

thank you all! frintjs is great.

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

No branches or pull requests

2 participants