@passport-next/http-types
v0.2.0
Published
Shared, dependency-free HTTP type contracts.
Readme
@passport-next/http-types
Dependency-free, augmentable HTTP type contracts.
Used by Passport Next packages but meant to be agnostic to them.
Install
pnpm i @passport-next/http-typesUsage
import type {
ConnectRequest,
Middleware,
} from '@passport-next/http-types';Applications can extend the common request contract with module augmentation:
import '@passport-next/http-types';
declare module '@passport-next/http-types' {
interface Request {
tenantId?: string;
}
}Request is framework-neutral. ConnectRequest adds the required, object-based header collection supplied by Node/Connect-style requests.
