UNPKG

secure-kit

Version:

Production-grade security + performance toolkit for backend frameworks with OWASP Top 10 compliance

3 lines 1.18 kB
"use strict"; // Framework-specific type extensions to resolve TypeScript errorsimport { Request as ExpressRequest } from 'express';import { FastifyRequest } from 'fastify';import { Context } from 'koa';// Express.js extensionsdeclare module 'express' { interface Request { files?: any; user?: any; }}// Fastify extensionsdeclare module 'fastify' { interface FastifyRequest { files?: any; cookies?: { [key: string]: string }; user?: any; } interface FastifyReply { setCookie(name: string, value: string, options?: any): void; }}// Koa extensionsdeclare module 'koa' { interface Request { body?: any; files?: any; connection?: { remoteAddress?: string; }; user?: any; } interface Context { params?: any; state: { user?: any; }; }}// Export types for use in adaptersexport interface ExtendedExpressRequest extends ExpressRequest { files?: any; user?: any;}export interface ExtendedFastifyRequest extends FastifyRequest { files?: any; cookies?: { [key: string]: string };}export interface ExtendedKoaContext extends Context { params?: any; state: { user?: any; };} //# sourceMappingURL=framework-extensions.js.map