-
Notifications
You must be signed in to change notification settings - Fork 520
Closed as not planned
Labels
status: invalidIssues with no action to takeIssues with no action to taketype: fixIssues describing a broken feature.Issues describing a broken feature.
Description
Description
https://github.com/typestack/class-transformer/blob/develop/src/TransformOperationExecutor.ts#L160
TargetType is DecimalJS https://github.com/MikeMcl/decimal.js/blob/master/decimal.js#L4285
and the valueType is Decimal
None of the if block in TransformOperationExecutor.ts covers this as a result it falls into
newValue = new (targetType as any)();
and the default constructor expects a valid argument
but if we pass
newValue = new (targetType as any)(value);
everything works
Expected behavior
Why shouldn't the value be passed in constructor ?
lehaiquantb
Metadata
Metadata
Assignees
Labels
status: invalidIssues with no action to takeIssues with no action to taketype: fixIssues describing a broken feature.Issues describing a broken feature.