mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
koa-pug: Provides its own types (#39452)
This commit is contained in:
committed by
Jesse Trinity
parent
e08d5a7f83
commit
28e81b93b4
@@ -1884,6 +1884,12 @@
|
||||
"sourceRepoURL": "https://github.com/koajs/jwt",
|
||||
"asOfVersion": "3.3.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "koa-pug",
|
||||
"typingsPackageName": "koa-pug",
|
||||
"sourceRepoURL": "https://github.com/chrisyip/koa-pug",
|
||||
"asOfVersion": "4.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "lambda-phi",
|
||||
"typingsPackageName": "lambda-phi",
|
||||
|
||||
Vendored
-44
@@ -1,44 +0,0 @@
|
||||
// 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
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import * as koa from "koa";
|
||||
|
||||
export = Pug;
|
||||
|
||||
/** main module */
|
||||
declare class Pug {
|
||||
locals: {
|
||||
[key: string]: any;
|
||||
};
|
||||
constructor(options?: Pug.PugOptions);
|
||||
use(app: koa): void;
|
||||
}
|
||||
|
||||
declare namespace Pug {
|
||||
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;
|
||||
}
|
||||
interface PugCtxOptions extends PugOptions {
|
||||
fromString: boolean;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"koa-pug-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"no-useless-files": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user