import { FormikErrors } from 'formik'; export function isServicePortError( error: string | FormikErrors | undefined ): error is FormikErrors { return error !== undefined && typeof error !== 'string'; } export function newPort(serviceName?: string) { return { port: undefined, targetPort: undefined, name: '', protocol: 'TCP', nodePort: undefined, serviceName, }; }