1import { Sign } from '../core/entity/sign';
2
3export class Signs { 4 public static SIGNS: Sign[] = [
5 {
6 id: 1,
4import { BrowserWindow } from 'electron';
5import * as path from 'path';
6
7export class AppWindowHandler { 8 // public static win: BrowserWindow;
9 private static _windows: BrowserWindow[] = [];
10
2import path from 'path';
3import fs from 'fs';
4
5export class IpcHandler { 6 public static initialize(): void {
7 ipcMain.handle(
8 'fs:saveFile',
1const args = process.argv.slice(1);
2
3export class ArgsHandler {4 public static serve = args.some((val): boolean => val === '--serve');
5}
20 providers: [SessionGuard],
21 exports: [RouterModule],
22})
23export class AppRoutingModule {}
Using class as a namespace can lead to errors.
class EmptyClass {}
class ConstructorOnly {
constructor() {
foo();
}
}
// Use an object instead:
class StaticOnly {
static version = 42;
static hello() {
console.log('Hello, world!');
}
}
class EmptyClass extends SuperClass {}
class ParameterProperties {
constructor(public name: string) {}
}
const StaticOnly = {
version: 42,
hello() {
console.log('Hello, world!');
},
};