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 support #131

Open
doublejosh opened this issue Feb 5, 2020 · 3 comments
Open

TypeScript support #131

doublejosh opened this issue Feb 5, 2020 · 3 comments

Comments

@doublejosh
Copy link

Would be lovely to have some docs about how to use this with TS. I'm new to this, but here's a start...

/types/react-snapshot/index.d.ts

declare module 'react-snapshot' {
}
@hiahmedhameed
Copy link

Dose any one try this website ? it has a snippet for adding the library with typescript.

@murbanowicz
Copy link

I will try to find time and prepare PR to get it through the @types/react-snapshot

@markliederbach
Copy link

Just pasting the above-mentioned workaround here for posterity:

In your ./src/react-app-env.d.ts, add the following

declare module 'react-snapshot' {
  import * as ReactDOM from 'react-dom';
  var render: ReactDOM.Renderer;
}

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

4 participants