1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-27 20:55:25 +00:00

Move global express args definition

This way tests that import the http utilities but not the routes won't
error due to missing types.
This commit is contained in:
Asher 2021-01-29 18:03:21 -06:00
parent 150513fbc4
commit 36aad9bdab
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
2 changed files with 12 additions and 11 deletions

View File

@ -5,10 +5,21 @@ import qs from "qs"
import safeCompare from "safe-compare"
import { HttpCode, HttpError } from "../common/http"
import { normalize, Options } from "../common/util"
import { AuthType } from "./cli"
import { AuthType, DefaultedArgs } from "./cli"
import { commit, rootPath } from "./constants"
import { Heart } from "./heart"
import { hash } from "./util"
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Express {
export interface Request {
args: DefaultedArgs
heart: Heart
}
}
}
/**
* Replace common variable strings in HTML templates.
*/

View File

@ -26,16 +26,6 @@ import * as _static from "./static"
import * as update from "./update"
import * as vscode from "./vscode"
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Express {
export interface Request {
args: DefaultedArgs
heart: Heart
}
}
}
/**
* Register all routes and middleware.
*/