UNPKG

@prefecthq/prefect-ui-library

Version:

This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.

17 lines (14 loc) 570 B
import { InvalidRouteParamValue, RouteParam } from '@prefecthq/vue-compositions' import { LocationQueryValue } from 'vue-router' import { DeploymentStatus, isDeploymentStatus } from '@/models' export class DeploymentStatusRouteParam extends RouteParam<DeploymentStatus> { protected override parse(value: LocationQueryValue): DeploymentStatus { if (value === null || !isDeploymentStatus(value)) { throw new InvalidRouteParamValue() } return value } protected override format(value: DeploymentStatus): LocationQueryValue { return value } }