Skip to content

ChainGraph API Documentation / @badaitech/chaingraph-types / Port

Function: Port()

Port<T>(config): PropertyDecorator

Defined in: packages/chaingraph-types/src/decorator/port.decorator.ts:43

Port decorator that stores port configuration for a property.

For ports of type "object", the "schema" is required and, if it is still a constructor, it is resolved via resolveObjectSchema.

For array ports, the "itemConfig" field is processed recursively via processItemConfig.

For enum ports, the "options" array is processed recursively via processEnumOptions.

Type Parameters

T

T extends "string" | "number" | "boolean" | "object" | "array" | "stream" | "enum" | "secret" | "any"

Parameters

config

PortDecoratorOptions<T> & object

The complete port decorator configuration.

Returns

PropertyDecorator

Licensed under BUSL-1.1