Closed emilio-notable closed 4 years ago
@AlanMorel please review :)
(btw, @AlanMorel, I'd like to make you a team member so you can review these PRs. Ok for you?)
@emilio-notable I merged #119 - please fix conflicts.
@emilio-notable I merged #119 - please fix conflicts.
👍 just rebased
@mweibel Sure yeah, you can add me as a team member :)
These changes look good to me, tested it locally and no issues. This is the proper way to do it when defining types for your own library, I am also very new to TypeScript and so I didn't know this until now so thanks for teaching me something @emilio-notable !
I was having issues importing this library with TS so I started looking at the index.d.ts. I don't have a lot of experience with TS, so I might be wrong, but looking at the docs here it seems that
export default
only works if the project has the configesModuleInterop: true
, and mentionsexport =
should work everywhere (and i also had to add thedeclare namespace init {}
to make it work).It also looks like
declare module 'connect-session-sequelize' {
is only used when declaring types for another library from your own project, so maybe is not necessary here?Finally, I added the
tableName?: string;
option, since it looked like it was missing (happy to open another PR for this if you guys think it would be better)Thanks!
EDIT: also added
stopExpiringSessions
to the type definition