Docs@skmtc/core

Schemas

TYPE

TypeSystemString

@skmtc/core 0.63.4

Type system representation of string types.

Signature

import type { TypeSystemString } from '@skmtc/core'

Properties

type, 'string' required

Discriminator for the string type

format, string | undefined required

String format specification (email, uuid, date-time, etc.)

enums, string[] | (string | null)[] | undefined required

Array of allowed enum values

modifiers, Modifiers required

Type modifiers (optional, nullable, etc.)

generatorKey, GeneratorKey

Optional generator-specific key for tracking

Examples

Example
const emailString: TypeSystemString = {
  type: 'string',
  format: 'email',
  enums: undefined,
  modifiers: { optional: false, nullable: false }
};

const statusEnum: TypeSystemString = {
  type: 'string',
  format: undefined,
  enums: ['active', 'inactive', 'pending'],
  modifiers: { optional: false, nullable: false }
};