Skip to content

Commit

Permalink
fix: type import from csstype (#1457)
Browse files Browse the repository at this point in the history
* fix: type import from csstype

* fix: wrong type extends in NormalCssValues
  • Loading branch information
hosseinmd authored Feb 25, 2021
1 parent 1f25942 commit ca8269f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/jss/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as css from 'csstype'
import {Properties as CSSProperties} from 'csstype'

// Observable support is included as a plugin. Including it here allows
// TypeScript users to use Observables, which could be confusing if a user
Expand All @@ -10,9 +10,9 @@ import {Observable} from 'indefinite-observable'
// TODO: Type data better, currently typed as any for allowing to override it
type Func<R> = ((data: any) => R)

type NormalCssProperties = css.Properties<string | number>
type NormalCssProperties = CSSProperties<string | number>
type NormalCssValues<K> = K extends keyof NormalCssProperties
? NormalCssProperties[K] | JssValue
? NormalCssProperties[K]
: JssValue

export type JssStyle =
Expand Down

0 comments on commit ca8269f

Please sign in to comment.