Skip to content

Instantly share code, notes, and snippets.

@tad-lispy
Created August 3, 2017 14:49
Show Gist options
  • Save tad-lispy/7215577f2706f58139e50fc3a603656d to your computer and use it in GitHub Desktop.
Save tad-lispy/7215577f2706f58139e50fc3a603656d to your computer and use it in GitHub Desktop.
Common Flow types
// @flow
export type Task<T> = any => Promise<T>;
export type SQSTask<T> = T => Promise<Object>;
// TODO: Move log function types annotations to @scrambled/logger
export type LogFunction = (
'debug' | 'informational' | 'warning' | 'error',
string,
Object | void
) => void;
// TODO: Move result function types annotations to @scrambled/monitoring-check-result
export type ResultFunction = (
string,
string,
'failure' | 'warning' | 'success',
string,
Object | void
) => Result;
// TODO: Define Result type
export type Result = Object;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment