cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.07k stars 397 forks source link

missing typings for `styled` #1555

Open mike-holm-percipient opened 2 years ago

mike-holm-percipient commented 2 years ago

Expected behavior: A clear and concise description of what you expected to happen.

  1. have a typescript + react project
  2. install react-jss
  3. import { styled } from "react-jss";

I expected to be able to use styled without typescript errors

Describe the bug: A clear and concise description of what happened instead of the expected behavior.

When I import styled I get the following error from tsc

'"../node_modules/react-jss/src"' has no exported member named 'styled'. Did you mean 'Styles'?

Reproduction:

Add a failing test to the suite and submit a PR. A test is even better than a fix. Alternatively create a codesandbox.io with the issue. Make it as minimal as possible as this will help us find the bug quicker.

https://codesandbox.io/s/react-jss-typescript-sokfq?file=/src/App.tsx

Versions (please complete the following information):

Managing expectations:

Maintainers will not be fixing the problem you have unless they have it too, if you want it to get fixed:

  1. Submit a PR with a failing test
  2. Discuss a solution
  3. Implement it

You can also do the first step only and wait for someone else to work on a fix. Anything is much better than nothing.

kof commented 2 years ago

styled wasn't officially released nor has any docs