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 13, 2020
1 parent 9b2ccec commit 8ede8cc
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 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.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"@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 8ede8cc

Please sign in to comment.