Installation
npm install --save @types/permit
Summary
This package contains type definitions for permit (https://github.com/ianstormtaylor/permit#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/permit.
index.d.ts
/// <reference types="node" />
import { IncomingMessage, ServerResponse } from "http";
export interface PermitOptions {
scheme?: string | undefined;
proxy?: string | undefined;
realm?: string | undefined;
}
export interface BearerOptions extends PermitOptions {
basic?: string | undefined;
header?: string | undefined;
query?: string | undefined;
}
export class Permit {
constructor(options: PermitOptions);
check(req: IncomingMessage): void;
fail(res: ServerResponse): void;
}
export class Bearer extends Permit {
constructor(options: BearerOptions);
check(req: IncomingMessage): string;
}
export class Basic extends Permit {
check(req: IncomingMessage): [string, string];
}
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/node
Credits
These definitions were written by Jannik Keye.