github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/webapp/javascript/models/flamegraphDotComResponse.ts (about) 1 import { z, ZodError } from 'zod'; 2 import { Result } from '@webapp/util/fp'; 3 import { modelToResult } from './utils'; 4 5 export const flamegraphDotComResponseScheme = z.object({ 6 url: z.string(), 7 }); 8 9 export type FlamegraphDotComResponse = z.infer< 10 typeof flamegraphDotComResponseScheme 11 >; 12 13 export function parse(a: unknown): Result<FlamegraphDotComResponse, ZodError> { 14 return modelToResult(flamegraphDotComResponseScheme, a); 15 }