Skip to content

Type Alias: PortRangeString ​

ts
type PortRangeString = string & tags.TagBase<{
  kind: "portRange";
  message: "Port range must be in the format 'start-end' with start < end";
  target: "string";
  validate: "\n      typeof $input === \"string\" &&\n      (() => {\n        const match = /^([0-9]+)-([0-9]+)$/.exec($input);\n        if (!match) return false;\n        const a = Number(match[1]), b = Number(match[2]);\n        return a < b;\n      })()\n    ";
  value: "portRange";
}>;

Job definition types for creating Nosana jobs