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

setStyleSheetSerializerOptions types not working #406

Open
tu4mo opened this issue Mar 19, 2022 · 1 comment
Open

setStyleSheetSerializerOptions types not working #406

tu4mo opened this issue Mar 19, 2022 · 1 comment

Comments

@tu4mo
Copy link

tu4mo commented Mar 19, 2022

error TS7016: Could not find a declaration file for module 'jest-styled-components/serializer'. '/Users/yadayadayada/node_modules/jest-styled-components/serializer/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/jest-styled-components` if it exists or add a new declaration (.d.ts) file containing `declare module 'jest-styled-components/serializer';`

2 import { setStyleSheetSerializerOptions } from 'jest-styled-components/serializer'
                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@insidewhy
Copy link

insidewhy commented Mar 22, 2022

This works:

import { styleSheetSerializer } from "jest-styled-components";

styleSheetSerializer.setStyleSheetSerializerOptions({});

The documentation is wrong.

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