brianc / node-pg-types

Type parsing for node-postgres
268 stars 55 forks source link

Wrong and too strict TS type definitions #98

Closed stekycz closed 5 years ago

stekycz commented 5 years ago

TS type definitions were added recently in version 2.2.0.

However, there is already an existing Definitely Typed version of them.

They are different and definitely typed version is better to use for us. ISo I would suggest merge of them together.

Differences (issues in new type definitions):

  1. Missing TypeParser type for parsing function
  2. Too strict oid: TypeId which does not allow custom DB types which might have any number
  3. Wrong arrayParser type definition that does not respect the implementation (Definitely Typed definition does)
bendrucker commented 5 years ago

All sounds valid, would really appreciate a PR!

stekycz commented 5 years ago

@bendrucker Created. I have tried to prepare the best definition of types possible that matches the implementation fully.