From e941fbf17ca80c245c4577b82a1b3fd27904d518 Mon Sep 17 00:00:00 2001 From: Francois Best Date: Wed, 21 Nov 2018 13:01:16 +0100 Subject: [PATCH] fix: Improve legibility, fix interpolation return type --- src/index.d.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index b564bb5..169217c 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -3,14 +3,20 @@ // Definitions by: François Best // TypeScript version: 3.1.6 -import { ThemedStyledProps, FlattenInterpolation } from 'styled-components' +import { + ThemedStyledProps, + InterpolationValue, + FlattenInterpolation +} from 'styled-components' + +type InterpolationFunction = ( + props: ThemedStyledProps +) => InterpolationValue | FlattenInterpolation> type GeneratorFunction = ( strings: TemplateStringsArray, ...interpolations: ( - | (( - props: ThemedStyledProps - ) => string | FlattenInterpolation>) + | InterpolationFunction | FlattenInterpolation>)[] ) => any