edmundhung / conform

A type-safe form validation library utilizing web fundamentals to progressively enhance HTML Forms with full support for server frameworks like Remix and Next.js.
https://conform.guide
MIT License
2k stars 107 forks source link

chore: simplify types #595

Closed lifeiscontent closed 6 months ago

lifeiscontent commented 6 months ago

simplifying types to resolved types.

  1. Array<T> -> T[]
  2. Record<string | number | symbol, unknown> -> Record<keyof any, unknown> as it resolves to the same thing
edmundhung commented 6 months ago

I am sorry but this is probably a perspective of preference here as I don't see this simplifying the types. 😅

Personally I prefer Array<T> over T[] especially with complex type, e.g. (A | B | C)[] is much harder to read then Array<A | B | C>. Similarly, Record<keyof any, unknown> requires an additional thought of what keyof any is.

lifeiscontent commented 6 months ago

@edmundhung hey no worries, I've closed the branch :)