diia-open-source / be-pkg-utils

European Union Public License 1.2
14 stars 10 forks source link

Rewrite ugly converter any to any #21

Open tshemsedinov opened 6 months ago

tshemsedinov commented 6 months ago

https://github.com/diia-open-source/be-pkg-utils/blob/main/src/converter.ts#L9C1-L33C2

  1. Rule is any, you can't read rule.convert
  2. If value will be undefined? Will it work?
  3. We will receive untyped value in result, how can we use it? More ifs?
  4. Rewrite if (rule.integer === true) to if (rule.integer)
  5. rule.convert === true
vird commented 6 months ago

https://github.com/diia-open-source/be-pkg-utils/pull/27