Skip to content

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

Function: isIPort()

isIPort(obj): obj is IPort<IPortConfig>

Defined in: packages/chaingraph-types/src/port/base/IPort.ts:218

Type guard function to check whether a provided object implements the IPort interface.

This function performs runtime checks to ensure that the object contains the required properties and methods of an IPort instance.

Parameters

obj

unknown

The object to check.

Returns

obj is IPort<IPortConfig>

True if the object implements IPort, false otherwise.

Licensed under BUSL-1.1