0.2.4 • Published 6 months ago

@types/permit v0.2.4

Weekly downloads
827
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for permit 0.2
// Project: https://github.com/ianstormtaylor/permit#readme
// Definitions by: Jannik Keye <https://github.com/jannikkeye>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <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: Thu, 08 Jul 2021 20:19:32 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Jannik Keye.

0.2.3

7 months ago

0.2.4

6 months ago

0.2.2

3 years ago

0.2.1

5 years ago

0.2.0

6 years ago