cssinjs/jss

Cannot use function values or function rules in TypeScript

Open

#1.342 geöffnet am 7. Mai 2020

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (434 Forks)batch import
help wantedtypescript

Repository-Metriken

Stars
 (7.000 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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 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