@types/koa-subdomain
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

Installation

npm install --save @types/koa-subdomain

Summary

This package contains type definitions for koa-subdomain (https://github.com/keenwon/koa-subdomain#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-subdomain.

index.d.ts

import { Middleware } from "koa";
import { IMiddleware } from "koa-router";

declare namespace Subdomain {}

interface MatchResult {
    middleware: IMiddleware;
    wildcardSubdomains: string[];
}

declare class Subdomain {
    constructor();
    use(domain: string, router: IMiddleware): Subdomain;
    routes(): Middleware;
    match(subdomains: string[]): MatchResult | null;
}

export = Subdomain;

Additional Details

Credits

These definitions were written by Jan Nöhles.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/koa-subdomain

Weekly Downloads

37

Version

3.0.2

License

MIT

Unpacked Size

3.55 kB

Total Files

5

Last publish

Collaborators

  • types