mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
[koa-pug] Meet types-2.0 (#13460)
* Meet types-2.0 * Update index.d.ts * Update index.d.ts * Update index.d.ts
This commit is contained in:
Vendored
+19
-11
@@ -5,20 +5,18 @@
|
||||
|
||||
import * as koa from "koa";
|
||||
|
||||
export namespace Koa {
|
||||
interface Context {
|
||||
render(viewPath: string, locals?: Pug.PugLocals, overrideOpts?: Pug.PugCtxOptions, noCache?: boolean): void;
|
||||
// tslint:disable-next-line:unified-signatures
|
||||
render(pugStr: string, locals?: Pug.PugLocals, overrideOpts?: Pug.PugCtxOptions): void;
|
||||
// tslint:disable-next-line:unified-signatures
|
||||
render(pugStr: string, locals?: Pug.PugLocals, noCache?: boolean): void;
|
||||
}
|
||||
}
|
||||
export class Pug {
|
||||
|
||||
export = Pug;
|
||||
|
||||
|
||||
/** main module */
|
||||
declare class Pug {
|
||||
constructor(options?: Pug.PugOptions);
|
||||
use(app: koa): void;
|
||||
}
|
||||
export namespace Pug {
|
||||
|
||||
|
||||
declare namespace Pug {
|
||||
export interface PugOptions {
|
||||
viewPath?: string;
|
||||
pretty?: boolean;
|
||||
@@ -35,3 +33,13 @@ export namespace Pug {
|
||||
}
|
||||
export interface PugLocals { [str: string]: any; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** plugin */
|
||||
declare module 'koa' {
|
||||
interface Context {
|
||||
render(viewPath: string, locals?: Pug.PugLocals, overrideOpts?: Pug.PugCtxOptions, noCache?: boolean): void;
|
||||
render(viewPath: string, locals?: Pug.PugLocals, overrideOpts?: boolean): void;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user