import * as React from "react"; import { StatelessComponent, ComponentClass, PureComponent, ReactElement } from "react"; type Component

= ComponentClass

| StatelessComponent

; export interface ThemeProps { theme: T; } export type ThemedStyledProps = P & ThemeProps; export type StyledProps

= ThemedStyledProps; export type ThemedOuterStyledProps = P & { theme?: T; innerRef?: (instance: any) => void; }; export type OuterStyledProps

= ThemedOuterStyledProps; export type Interpolation

= FlattenInterpolation

| ReadonlyArray | ReadonlyArray>>; export type FlattenInterpolation

= InterpolationValue | InterpolationFunction

; export type InterpolationValue = string | number | Styles | StyledComponentClass; export type SimpleInterpolation = InterpolationValue | ReadonlyArray>; export interface Styles { [ruleOrSelector: string]: string | number | Styles; } export interface InterpolationFunction

{ (props: P): Interpolation

; } type Attrs, T> = { [K in keyof A]: ((props: ThemedStyledProps) => A[K]) | A[K]; }; export interface StyledComponentClass extends ComponentClass> { extend: ThemedStyledFunction; withComponent(tag: K): StyledComponentClass; withComponent(element: ComponentClass

): StyledComponentClass; } export interface ThemedStyledFunction { (strings: TemplateStringsArray, ...interpolations: Interpolation>[]): StyledComponentClass; (strings: TemplateStringsArray, ...interpolations: Interpolation>[]): StyledComponentClass

; attrs = {}>(attrs: Attrs

): ThemedStyledFunction

; } export type StyledFunction

= ThemedStyledFunction; type ThemedStyledComponentFactories = { [TTag in keyof JSX.IntrinsicElements]: ThemedStyledFunction; }; export interface ThemedBaseStyledInterface extends ThemedStyledComponentFactories { (tag: TTag): ThemedStyledFunction; (component: StyledComponentClass): ThemedStyledFunction;

(component: React.ComponentType

): ThemedStyledFunction>; } export type BaseStyledInterface = ThemedBaseStyledInterface; export type ThemedStyledInterface = ThemedBaseStyledInterface; export type StyledInterface = ThemedStyledInterface; export interface ThemeProviderProps { theme?: T | ((theme: T) => T); } export type ThemeProviderComponent = ComponentClass>; export interface ThemedCssFunction { (strings: TemplateStringsArray, ...interpolations: SimpleInterpolation[]): InterpolationValue[];

(strings: TemplateStringsArray, ...interpolations: Interpolation>[]): FlattenInterpolation>[]; } // Helper type operators type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; type Omit = Pick>; type WithOptionalTheme

= Omit & { theme?: T; }; export interface ThemedStyledComponentsModule { default: ThemedStyledInterface; css: ThemedCssFunction; keyframes(strings: TemplateStringsArray, ...interpolations: SimpleInterpolation[]): string; injectGlobal(strings: TemplateStringsArray, ...interpolations: SimpleInterpolation[]): void; withTheme

(component: Component

): ComponentClass>; ThemeProvider: ThemeProviderComponent; } declare const styled: StyledInterface; export const css: ThemedCssFunction; export function withTheme

(component: Component

): ComponentClass>; export function keyframes(strings: TemplateStringsArray, ...interpolations: SimpleInterpolation[]): string; export function injectGlobal(strings: TemplateStringsArray, ...interpolations: SimpleInterpolation[]): void; export function consolidateStreamedStyles(): void; export const ThemeProvider: ThemeProviderComponent; interface StylesheetComponentProps { sheet: ServerStyleSheet; } interface StyleSheetManagerProps { sheet?: ServerStyleSheet; target?: Node; } export class StyleSheetManager extends React.Component { } export class ServerStyleSheet { collectStyles(tree: React.ReactNode): ReactElement; getStyleTags(): string; getStyleElement(): ReactElement<{}>[]; interleaveWithNodeStream(readableStream: NodeJS.ReadableStream): NodeJS.ReadableStream; instance: StyleSheet; } export default styled;