Skip to main content

Nullable Variable Definition Value Model

The value model describes an optional definition of a variable.


Check the Editors Example.


import { createNullableVariableDefinitionValueModel } from 'sequential-workflow-editor-model';

variableType: 'string',
isRequired: true,
defaultValue: {
name: 'someName',
type: 'string'

Required properties:

  • variableType - the type of the variable.

Optional properties:

  • isRequired - if the variable definition is required. Default value is false,
  • defaultValue - the default value of the variable definition.

Value Reading

The value is stored in a simple object:

interface VariableDefinition {
name: string;
type: string;

type NullableVariableDefinition = VariableDefinition | null;

To read the value you just need to read the property value:

const value: NullableVariableDefinition =['foo']; // null or { name: '...', type: '...' }