Typescript migration

* app.js
* main.js
* router.js
This commit is contained in:
baldo 2020-04-08 03:19:55 +02:00
parent 94d01310b9
commit 9652519267
12 changed files with 256 additions and 157 deletions
server/@types/http-auth

15
server/@types/http-auth/index.d.ts vendored Normal file
View file

@ -0,0 +1,15 @@
declare module "http-auth" {
import {RequestHandler} from "express"
class Auth {}
class BasicAuth extends Auth {}
class BasicAuthOptions {}
type BasicAuthChecker =
(username: string, password: string, callback: BasicAuthCheckerCallback) => void
type BasicAuthCheckerCallback = (result: boolean | Error, customUser?: string) => void
function basic(options: BasicAuthOptions, checker: BasicAuthChecker): BasicAuth
function connect(auth: Auth): RequestHandler
}