import { Transform } from 'class-transformer';

export function TryToTransformStringInNumber(): PropertyDecorator {
  return Transform(({ value }) => {
    const _value = Number(value);

    if (Number.isNaN(_value)) return value;

    return _value;
  });
}
