1
0
mirror of https://github.com/seejohnrun/haste-server.git synced 2025-12-28 00:21:28 +00:00
Files
haste-server/src/global.d.ts
Yusuf Yilmaz a5b0a98b3f add prettier
2022-06-06 19:44:11 +02:00

61 lines
1.0 KiB
TypeScript

declare module 'rethinkdbdash' {
type Result = {
data: string
}
type Callback = (error: unknown, result?: Result) => void
interface RethinkRun {
run(callback: Callback)
}
type RethinkInsertObject = {
id: string
data: string
}
interface RethinkFunctions {
insert(object: RethinkInsertObject): RethinkRun
get(x: string): RethinkRun
}
export interface RethinkClient {
table(s: string): RethinkFunctions
}
function rethink<T>(obj: T): RethinkClient<T>
export = rethink
}
declare module 'connect-ratelimit' {
function connectRateLimit(
as: RateLimits
): (
req: express.Request,
res: express.Response,
next: express.NextFunction
) => void
export = connectRateLimit
}
declare namespace Express {
export interface Request {
sturl: string
}
}
declare module 'st' {
type ConnectSt = {
path: string
content: { maxAge: number }
passthrough?: boolean
index: boolean | string
}
function connectSt(st: ConnectSt): Middleware
export = connectSt
}