<commit_before>// @flow

declare module 'styled-components' {
  declare class InterpolatableComponent<P> extends React$Component<P> {
    static +styledComponentId: string;
  }

  declare export type Interpolation<P> =
    | ((executionContext: P) =>
      | ((executionContext: P) => InterpolationBase)
      | InterpolationBase
    )
    | Class<InterpolatableComponent<any>>
    | InterpolationBase

  declare export type InterpolationBase =
    | CSSRules
    | KeyFrames
    | string
    | number
    | false // falsy values are OK, true is the only one not allowed, because it renders as "true"
    | null
    | void
    | {[ruleOrSelector: string]: string | number, ...} // CSS-in-JS object returned by polished are also supported, partially

  declare export type TaggedTemplateLiteral<I, R> = (strings: string[], ...interpolations: Interpolation<I>[]) => R<commit_msg>Allow function within styled(..) (#3779)<commit_after>// @flow

declare module 'styled-components' {
  declare class InterpolatableComponent<P> extends React$Component<P> {
    static +styledComponentId: string;
  }

  declare export type Interpolation<P> =
    | ((executionContext: P) =>
      | ((executionContext: P) => InterpolationBase)
      | InterpolationBase
    )
    | Class<InterpolatableComponent<any>>
    | InterpolationBase

  declare export type InterpolationBase =
    | CSSRules
    | KeyFrames
    | string
    | number
    | false // falsy values are OK, true is the only one not allowed, because it renders as "true"
    | null
    | void
    | {[ruleOrSelector: string]: string | number, ...} // CSS-in-JS object returned by polished are also supported, partially

  declare export type TaggedTemplateLiteral<I, R> = {
    [[call]]: (strings: string[], ...interpolations: Interpolation<I>[]) => R,
    [[call]]: ((props: I) => Interpolation<any>) => R,
    ...
  };
{'fraction_non_alphanumeric': 0.1232583065380493, 'fraction_numerical': 0.0021436227224008574, 'mean_word_length': 3.41371158392435, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5714828', 'n_tokens_mistral': 552, 'n_tokens_neox': 544, 'n_words': 159}