generateTrendFunctionAsString.tsx 514 B

12345678910111213141516171819
  1. import type {AggregationKeyWithAlias} from 'sentry/utils/discover/fields';
  2. import {generateFieldAsString} from 'sentry/utils/discover/fields';
  3. import type {TrendFunctionField} from '../types';
  4. export default function generateTrendFunctionAsString(
  5. trendFunction: TrendFunctionField,
  6. trendParameter: string
  7. ): string {
  8. return generateFieldAsString({
  9. kind: 'function',
  10. function: [
  11. trendFunction as AggregationKeyWithAlias,
  12. trendParameter,
  13. undefined,
  14. undefined,
  15. ],
  16. });
  17. }