Skip to content

Commit

Permalink
fix: Improve legibility, fix interpolation return type
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Nov 21, 2018
1 parent 01054ff commit 311913d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@
// Definitions by: François Best <https://github.com/franky47>
// TypeScript version: 3.1.6

import { ThemedStyledProps, FlattenInterpolation } from 'styled-components'
import {
ThemedStyledProps,
InterpolationValue,
FlattenInterpolation
} from 'styled-components'

type InterpolationFunction<Props, Theme> = (
props: ThemedStyledProps<Props, Theme>
) => InterpolationValue | FlattenInterpolation<ThemedStyledProps<Props, Theme>>

type GeneratorFunction<Props, Theme> = (
strings: TemplateStringsArray,
...interpolations: (
| ((
props: ThemedStyledProps<Props, Theme>
) => string | FlattenInterpolation<ThemedStyledProps<Props, Theme>>)
| InterpolationFunction<Props, Theme>
| FlattenInterpolation<ThemedStyledProps<Props, Theme>>)[]
) => any

Expand Down

0 comments on commit 311913d

Please sign in to comment.