diff options
author | Gavin Mogan <git@gavinmogan.com> | 2025-04-25 21:43:39 -0700 |
---|---|---|
committer | Gavin Mogan <git@gavinmogan.com> | 2025-04-25 21:46:07 -0700 |
commit | 14041a319cace03cfc23c0a919ed81fb141f88ce (patch) | |
tree | c87d43fe3f889bf0794caa42953781533196cb45 /src/index.d.ts | |
parent | a8a17443c2d070d2d23920ffff7e4a43c905698c (diff) |
Refactor to have email service
* Move hbsInstance back to app
* Add email and hbs to req so typescript 🎉🎉🎉
* Init Email and config once
Diffstat (limited to 'src/index.d.ts')
-rw-r--r-- | src/index.d.ts | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/index.d.ts b/src/index.d.ts index 292e5d3..4811f7f 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,14 +1,17 @@ import "express"; -import { GathioConfig } from "./lib/config.js"; +import { GathioConfig } from "./lib/config.ts"; +import { EmailService } from "./lib/email.ts"; +import { ExpressHandlebars } from "express-handlebars"; interface Locals { config: GathioConfig; } -declare module "express" { - export interface Response { - locals: { - config?: GathioConfig; - }; +declare global { + namespace Express { + interface Request extends Express.Request { + hbsInstance: ExpressHandlebars; + emailService: EmailService; + } } -} +}
\ No newline at end of file |