mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 05:20:25 +00:00
Add generic support for [@types/koa-mount] (#36365)
* Add generic support * fix: lint errors * fix: unnecessary semicolon * feat: add generic types in overload
This commit is contained in:
committed by
Benjamin Lichtman
parent
c98d58d673
commit
4070665056
Vendored
+9
-3
@@ -1,15 +1,21 @@
|
||||
// Type definitions for koa-mount 3.0
|
||||
// Type definitions for koa-mount 4.0
|
||||
// Project: https://github.com/koajs/mount
|
||||
// Definitions by: AmirSaber Sharifi <https://github.com/amirsaber>
|
||||
// Tomek Łaziuk <https://github.com/tlaziuk>
|
||||
// Vladislav Polyakov <https://github.com/polrk>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import Koa = require("koa");
|
||||
|
||||
declare function mount(app: Koa.Middleware | Koa): Koa.Middleware;
|
||||
declare function mount<StateT = any, CustomT = {}>(
|
||||
app: Koa.Middleware<StateT, CustomT> | Koa<StateT, CustomT>
|
||||
): Koa.Middleware<StateT, CustomT>;
|
||||
|
||||
declare function mount(prefix: string, app: Koa.Middleware | Koa): Koa.Middleware;
|
||||
declare function mount<StateT = any, CustomT = {}>(
|
||||
prefix: string,
|
||||
app: Koa.Middleware<StateT, CustomT> | Koa<StateT, CustomT>
|
||||
): Koa.Middleware<StateT, CustomT>;
|
||||
|
||||
declare namespace mount { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user