cssinjs / cssinjs/jss

Cannot use function values or function rules in TypeScript

Open
#1,342 0 comments 0 reactions 0 assignees View on GitHub
help wanted typescript
Dominant language
JavaScript
Stars
7.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

__Expected behavior:__
Function values and function rules should render the appropriate CSS.

__Describe the bug:__
The rule which includes a function does not render. This is the typescript error (for function rules)

```
Index signature is missing in type '(data: any) => { backgroundColor: any; width: number; height: number; }'
```

__Codesandbox link:__
Please create a [codesandbox.io](https://codesandbox.io/) with the issue. Make it as minimal as possible as this will help us find the bug quicker.

https://codesandbox.io/s/nifty-visvesvaraya-7eq2v?file=/src/index.ts

__Versions (please complete the following information):__
- jss: 10.1.1
- jss-plugin-camel-case: 10.1.1
- Browser [e.g. chrome, safari]:
- OS [e.g. Windows, macOS]: Windows 10 (Also present in CodeSandbox)
Feel free to add any additional versions which you may think are relevant to the bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.