<commit_before>
type ClassesType = Record<string,any>
type ThemeType = any
type JssStyles = any

interface WithStylesProps {
  classes: ClassesType,
};

type WithMessagesMessage = string|{id?: string, properties?: any, messageString?: string, type?: string, action?: any};

interface WithMessagesProps {
  messages: Array<WithMessagesMessage>,
  flash: (message: WithMessagesMessage)=>void,
  clear: ()=>void,
}

interface WithUserProps {
  currentUser: UsersCurrent|null,
}

interface WithTrackingProps {
  captureEvent: any,
}

interface WithTimezoneProps {
  timezone: string,
  timezoneIsKnown: boolean,
}

interface WithNavigationProps {
  history: any,
}

interface WithLocationProps {
  location: any,
}

interface WithDialogProps {
  openDialog: any,
}

interface WithGlobalKeydownProps {
  addKeydownListener: any,
}

interface WithHoverProps {
  hover: boolean,
  anchorEl: HTMLElement|null,
  stopHover: ()=>void,
}

interface WithApolloProps {
  client: any;
}

type WithUpdateFunction<T extends CollectionBase> = any;

interface WithUpdateUserProps {
  updateUser: WithUpdateFunction<UsersCollection>
}
interface WithUpdateCommentProps {
  updateComment: WithUpdateFunction<CommentsCollection>
}
interface WithUpdatePostProps {
  updatePost: WithUpdateFunction<PostsCollection><commit_msg>include hocTypes in type checking, fix type error<commit_after>
type ClassesType = Record<string,any>
type ThemeType = any
type JssStyles = any

interface WithStylesProps {
  classes: ClassesType,
};

type WithMessagesMessage = string|{id?: string, properties?: any, messageString?: string, type?: string, action?: any};

interface WithMessagesProps {
  messages: Array<WithMessagesMessage>,
  flash: (message: WithMessagesMessage)=>void,
  clear: ()=>void,
}

interface WithUserProps {
  currentUser: UsersCurrent|null,
}

interface WithTrackingProps {
  captureEvent: any,
}

interface WithTimezoneProps {
  timezone: string,
  timezoneIsKnown: boolean,
}

interface WithNavigationProps {
  history: any,
}

interface WithLocationProps {
  location: any,
}

interface WithDialogProps {
  openDialog: any,
}

interface WithGlobalKeydownProps {
  addKeydownListener: any,
}

interface WithHoverProps {
  hover: boolean,
  anchorEl: HTMLElement|null,
  stopHover: ()=>void,
}

interface WithApolloProps {
  client: any;
}

// This is a bit arcane. I think of this basically as a type "function" that
// says, for a given collection base, I am the DbObject extension it is using.
// https://stackoverflow.com/questions/63631364/infer-nested-generic-types-in-typescript/63631544#63631544
type DbObjectForCollectionBase<C> = C extends CollectionBase<infer T> ? T : never

type WithUpdateFunction<T extends CollectionBase<U>, U extends DbObject = DbObjectForCollectionBase<T>> = any;

interface WithUpdateUserProps {
  updateUser: WithUpdateFunction<UsersCollection>
}

interface WithUpdateCommentProps {
  updateComment: WithUpdateFunction<CommentsCollection>
}
interface WithUpdatePostProps {
  updatePost: WithUpdateFunction<PostsCollection>
{'fraction_non_alphanumeric': 0.09075961854653075, 'fraction_numerical': 0.007892140743176587, 'mean_word_length': 6.02540415704388, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, 'https://': 1, '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': '3741858', 'n_tokens_mistral': 916, 'n_tokens_neox': 891, 'n_words': 236}