<commit_before>type HookMethod<Options, Result> = (
  options: Options
) => Result | Promise<Result>

type BeforeHook<Options> = (options: Options) => void
type ErrorHook<Options, Error> = (error: Error, options: Options) => void
type AfterHook<Options, Result> = (result: Result, options: Options) => void
type WrapHook<Options, Result> = (
  hookMethod: HookMethod<Options, Result>,
  options: Options
) => Result | Promise<Result>

type AnyHook<Options, Result, Error> =
  | BeforeHook<Options>
  | ErrorHook<Options, Error>
  | AfterHook<Options, Result>
  | WrapHook<Options, Result>

type TypeStoreKeyLong = 'Options' | 'Result' | 'Error'
type TypeStoreKeyShort = 'O' | 'R' | 'E'
type TypeStore =
  | ({ [key in TypeStoreKeyLong]?: any } &<commit_msg>fix(typescript): async hooks are supported (#90)<commit_after>type HookMethod<Options, Result> = (
  options: Options
) => Result | Promise<Result>

type BeforeHook<Options> = (options: Options) => void | Promise<void>
type ErrorHook<Options, Error> = (
  error: Error,
  options: Options
) => void | Promise<void>
type AfterHook<Options, Result> = (
  result: Result,
  options: Options
) => void | Promise<void>
type WrapHook<Options, Result> = (
  hookMethod: HookMethod<Options, Result>,
  options: Options
) => Result | Promise<Result>

type AnyHook<Options, Result, Error> =
  | BeforeHook<Options>
  | ErrorHook<Options, Error>
  | AfterHook<Options, Result>
  | WrapHook<Options, Result>

type TypeStoreKeyLong = 'Options' | 'Result' | 'Error'
type TypeStoreKeyShort = 'O' | 'R' | 'E'
type TypeStore =
  | ({ [key in TypeStoreKeyLong]?: any } &
{'fraction_non_alphanumeric': 0.14605344934742076, 'fraction_numerical': 0.001243008079552517, 'mean_word_length': 5.338582677165355, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 42, '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': '1135868', 'n_tokens_mistral': 515, 'n_tokens_neox': 511, 'n_words': 138}