typings for route in Server.ts

merge-requests/1/merge
Matthew 2019-11-18 20:52:12 -05:00
parent 0150affaf5
commit ade9525cf9
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ export default class Server {
if (routeFile === 'index.js') return; if (routeFile === 'index.js') return;
try { try {
// eslint-disable-next-line new-cap // eslint-disable-next-line new-cap
const route = new (require(`${__dirname}/routes/${routeFile}`).default)(this); const route: Route = new (require(`${__dirname}/routes/${routeFile}`).default)(this);
if (route.conf.deprecated === true) { if (route.conf.deprecated === true) {
route.deprecated(); route.deprecated();
} else if (route.conf.maintenance === true) { } else if (route.conf.maintenance === true) {