Skip to content

Function: convertClassPropertiesAndMaintainNumberTypes()

Converts the number fields of a class instance to their new type, while maintaining the rest of the class structure.

convertClassPropertiesAndMaintainNumberTypes<U>(obj, convertFunction, options?, depth?): CustomType<any>

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:395

Converts the number fields of a class instance to their new type, while maintaining the rest of the class structure.

Lastly, it recalls the constructor of the class with the new JSON object.

Type Parameters

U

U extends NumberType

Parameters

obj

CustomType<any>

convertFunction

(item) => U

options?

ConvertOptions

depth?

number = 0

Returns

CustomType<any>

Edit this page on GitHub