server: services: migrate to TypeScript

This commit is contained in:
Jesse Chan
2020-09-22 22:42:50 +08:00
parent dcbe26b940
commit 43b2d8fbbf
138 changed files with 3570 additions and 3238 deletions
+10
View File
@@ -7,12 +7,22 @@ import morgan from 'morgan';
import passport from 'passport';
import path from 'path';
import type {UserInDatabase} from '@shared/types/Auth';
import apiRoutes from './routes/api';
import authRoutes from './routes/auth';
import passportConfig from './config/passport';
import paths from '../shared/config/paths';
import Users from './models/Users';
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Express {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface User extends UserInDatabase {}
}
}
const app = express();
Users.bootstrapServicesForAllUsers();