From 1d6edf7767d0d01bc66aa6a0b447b0e436cb4e16 Mon Sep 17 00:00:00 2001 From: David Ruisinger Date: Sat, 23 Feb 2019 22:31:07 +0100 Subject: [PATCH] Added isStyledComponent --- types/styled-components/native.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/styled-components/native.d.ts b/types/styled-components/native.d.ts index c67df4d7a1..189e284525 100644 --- a/types/styled-components/native.d.ts +++ b/types/styled-components/native.d.ts @@ -15,6 +15,7 @@ export { import { AnyStyledComponent, DefaultTheme, + isStyledComponent, StyledComponentInnerAttrs, StyledComponentInnerComponent, StyledComponentInnerOtherProps, @@ -226,6 +227,9 @@ export interface ReactNativeThemedStyledComponentsModule< ThemeProvider: ThemeProviderComponent; ThemeConsumer: React.Consumer; ThemeContext: React.Context; + + // This could be made to assert `target is StyledComponent` instead, but that feels not type safe + isStyledComponent: typeof isStyledComponent; } declare const styled: ReactNativeStyledInterface;