mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +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:
parent
128567f711
commit
0510c2ebf7
30
koa-pug/index.d.ts
vendored
30
koa-pug/index.d.ts
vendored
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user