atlassian-labs / compiled

A familiar and performant compile time CSS-in-JS library for React.
https://compiledcssinjs.com
Apache License 2.0
1.98k stars 68 forks source link

Add additional type exports #1655

Closed mitch1995 closed 4 months ago

mitch1995 commented 4 months ago

Currently when using moduleResolutions such as node16, nodenext or bundler with declaration: true there are quite a few typescript errors present, as shown below

image

I created a minimum reproduction repo to demonstrate this here.

Steps to reproduce:

  1. npx create-react-app my-app --template typescript
  2. add dependency for @compiled/react (0.17.0)
  3. Update tsconfig.json to have moduleResolution: Bundler and delcaration: true
  4. Create a file using imports from @compiled/react like styled and createStrictAPI and you will experience type errors
changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: e86df7dc767ed9bb374657c6455b538db898eede

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | --------------- | ----- | | @compiled/react | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR