Convert to TypeScript

This commit is contained in:
Jonathan Barrow
2023-08-17 22:32:40 -04:00
parent 3b5aeb222c
commit 38739fef7e
26 changed files with 4247 additions and 445 deletions

View File

@@ -0,0 +1,14 @@
export interface Config {
http: {
port: number;
};
crypto: {
wup: {
aes_key: Buffer;
hmac_key: Buffer;
};
ctr: {
aes_key: Buffer;
};
};
}

16
src/types/express-subdomain.d.ts vendored Normal file
View File

@@ -0,0 +1,16 @@
// * Credit to https://github.com/bmullan91/express-subdomain/pull/61 for the types!
declare module 'express-subdomain'{
import type { Request, Response, Router } from 'express';
/**
* @description The subdomain function.
* @param subdomain The subdomain to listen on.
* @param fn The listener function, takes a response and request.
* @returns A function call to the value passed as FN, or void (the next function).
*/
export default function subdomain(
subdomain: string,
fn: Router | ((req: Request, res: Response) => void | any)
): (req: Request, res: Response, next: () => void) => void | typeof fn;
}