Skip to content

Instantly share code, notes, and snippets.

@gladimdim
Created December 18, 2017 11:57
Show Gist options
  • Save gladimdim/1fa24ff98987e1c8bd57abbcc2f65990 to your computer and use it in GitHub Desktop.
Save gladimdim/1fa24ff98987e1c8bd57abbcc2f65990 to your computer and use it in GitHub Desktop.
Constructors for two metric types
type metricCount = {type_: string};
type metricWithLabel = {
type_: string,
label: string
};
let createCountWithLabel = (label: string) : metricWithLabel => {type_: "COUNT", label};
let countMetric: metricCount = {type_: "COUNT"};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment