Closed MohamedLamineAllal closed 5 years ago
Thank you sir. I will add tests and then commit again.
I just added tests and a minimal change to types declaration. (added TypeFormat type, and the overloading of the setTypeParser Function). Let me know if there is anything to add.
Thanks for working on this. Made a couple small changes:
npx
, not required in npm scripts (they already include ./node_modules/.bin
in $PATH
npm test
tsd
does not run on node 4Just need to follow up when I’m at my laptop and update the lockfile since I made the edits via the web interface. Should be good to merge and cut a new minor release in an hour or so.
What should we do about the types in DefinitelyTyped now that there is official support? I assume we shouldn’t remove them and break existing users, but I’m hoping there’s somewhere we can put a deprecation notice.
Hi sir. I'm late. i looked at the changes. Thank you for the details.
For types in DefinitelyTyped. Yea, it should be exactly as you said (most logical thing, as otherwise i will think to update @types/pg-types, which is useless). And for the notice, i think it would be nice to just add it to this repo package Readme. I will fill a PR suggesting a deprecation notice. I will add a section Typescript. Where i will explain the typescript support. And also put the deprecation notice.
Thank you again sir.
pg.types.builtins is missing from @types/pg Even though the type imports is set to be automaticly resolved from pgTypes import pgTypes = require("pg-types"); export const types: typeof pgTypes;
Having a declarative typing directly set in pg-types. Will give better flexibility and better update time.
Here a PR that propose a fix.
If there is anything that is not ok. Let me know.
Context: (latest versions)
(builtins are missing)
(after fix)