Skip to content

ChainGraph API Documentation / @badaitech/chaingraph-nodes / mapToInstance

Function: mapToInstance() ​

mapToInstance<T>(source, Constructor): T

Defined in: packages/chaingraph-nodes/src/nodes/okx-dex-api/mappers.ts:43

Base mapper utility function that creates a new instance of a class and copies properties from the source object

Type Parameters ​

T ​

T

Parameters ​

source ​

any

Constructor ​

() => T

Returns ​

T

Licensed under BUSL-1.1