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

Types missing for macro versions of emotion libs #1335

Closed
osdiab opened this issue Apr 30, 2019 · 1 comment
Closed

Types missing for macro versions of emotion libs #1335

osdiab opened this issue Apr 30, 2019 · 1 comment

Comments

@osdiab
Copy link
Contributor

osdiab commented Apr 30, 2019

  • emotion version: 10.0.10
  • react version: 16.8.6

Relevant code:

import css from "@emotion/css/macro";  // types for module not found
import { injectGlobal} from "emotion/macro"  // same

What you did:

I started a codebase with create-react-app with TypeScript, which without ejecting, can't use the Emotion babel plugin. So i want to use the babel macros as suggested in docs, but no typings are available for the macro versions of the codebase. There are, however for @emotion/styled, but they are not yet published. #1315

What happened:

I had to add declarations for the emotion modules in my own codebase to use it

Suggested solution:
Add similar typings for all the other Emotion packages.

@Andarist
Copy link
Member

Typings for @emotion/css/macro and @emotion/styled/macro are available already for quite some already. I've just created a PR (#1583) for missing types for emotion/macro though.

I expect this PR to be merged & released soon, so I'm closing this issue to keep the issue tracker clean.

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