koa-pug: Provides its own types (#39452)

This commit is contained in:
Alexander T
2019-10-28 08:54:05 -07:00
committed by Jesse Trinity
parent e08d5a7f83
commit 28e81b93b4
5 changed files with 6 additions and 73 deletions
+6
View File
@@ -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",
-44
View File
@@ -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;
}
}
View File
-23
View File
@@ -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"
]
}
-6
View File
@@ -1,6 +0,0 @@
{
"extends": "dtslint/dt.json",
"rules": {
"no-useless-files": false
}
}