mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Create koa-pug definitions (#13220)
* Create koa-pug definitions * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI
This commit is contained in:
parent
0b2bdb8321
commit
67a9bd38ae
37
koa-pug/index.d.ts
vendored
Normal file
37
koa-pug/index.d.ts
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
// Type definitions for koa-pug 3.0
|
||||
// Project: https://github.com/chrisyip/koa-pug
|
||||
// Definitions by: Xavier Stouder <https://github.com/Xstoudi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
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 {
|
||||
constructor(options?: Pug.PugOptions);
|
||||
use(app: koa): void;
|
||||
}
|
||||
export namespace Pug {
|
||||
export interface PugOptions {
|
||||
viewPath?: string;
|
||||
pretty?: boolean;
|
||||
compileDebug?: boolean;
|
||||
debug?: boolean;
|
||||
locals?: PugLocals;
|
||||
noCache?: boolean;
|
||||
helperPath?: string | Array<string | { [str: string]: any }>;
|
||||
basedir?: string;
|
||||
app?: koa;
|
||||
}
|
||||
export interface PugCtxOptions extends PugOptions {
|
||||
fromString: boolean;
|
||||
}
|
||||
export interface PugLocals { [str: string]: any; }
|
||||
}
|
||||
0
koa-pug/koa-pug-tests.ts
Normal file
0
koa-pug/koa-pug-tests.ts
Normal file
19
koa-pug/tsconfig.json
Normal file
19
koa-pug/tsconfig.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"koa-pug-tests.ts"
|
||||
]
|
||||
}
|
||||
1
koa-pug/tslint.json
Normal file
1
koa-pug/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Loading…
Reference in New Issue
Block a user