Skip to content

Commit

Permalink
refactor: add express typings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Haehnlein authored and dhhyi committed Feb 20, 2020
1 parent d95b36e commit 7cfb066
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 9 deletions.
62 changes: 62 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.803.23",
"@angular-devkit/core": "^8.3.23",
"@angular-devkit/schematics": "^8.3.23",
"@angular/cli": "^8.3.23",
"@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~8.2.14",
"@babel/preset-env": "^7.8.3",
"@schematics/angular": "^8.3.23",
"@angular-devkit/core": "^8.3.18",
"@angular-devkit/schematics": "^8.3.18",
"@angular/cli": "^8.3.18",
"@angular/compiler-cli": "~8.2.13",
"@angular/language-service": "~8.2.13",
"@babel/preset-env": "^7.5.5",
"@schematics/angular": "^8.3.18",
"@types/express": "^4.17.2",
"@types/jest": "^24.0.18",
"@types/node": "^12.12.7",
"codelyzer": "^5.1.0",
Expand Down
4 changes: 2 additions & 2 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const angularUniversal = (req: express.Request, res: express.Response) => {
req,
res,
},
(err: Error, html: string) => {
(err, html) => {
if (html) {
let newHtml: string;
if (process.env.PROXY_ICM && req.get('host')) {
Expand All @@ -164,7 +164,7 @@ const angularUniversal = (req: express.Request, res: express.Response) => {
);
};

const hybridRedirect = (req, res, next) => {
const hybridRedirect = (req: express.Request, res: express.Response, next: express.NextFunction) => {
const url = req.originalUrl;
let newUrl: string;
for (const entry of HYBRID_MAPPING_TABLE) {
Expand Down

0 comments on commit 7cfb066

Please sign in to comment.