Revize 61bda4b7
Přidáno uživatelem Pavel Fidranský před více než 6 roky(ů)
sources/src/main/webapp/js/app.js | ||
---|---|---|
1 |
/** |
|
2 |
* Main class of the application. |
|
3 |
*/ |
|
4 |
class App { |
|
5 |
/** |
|
6 |
* @constructor |
|
7 |
* @param {string} name Name of the application. |
|
8 |
* @param {string} homeUrl Base URL of the application. |
|
9 |
*/ |
|
10 |
constructor(name, homeUrl) { |
|
11 |
this.name = name; |
|
12 |
this.homeUrl = homeUrl; |
|
13 |
} |
|
14 |
|
|
15 |
/** |
|
16 |
* @abstract |
|
17 |
*/ |
|
18 |
run() { |
|
19 |
throw new AbstractMethodError; |
|
20 |
} |
|
21 |
} |
sources/src/main/webapp/js/errors/abstractMethodError.js | ||
---|---|---|
1 |
/** |
|
2 |
* Error thrown when an abstract method is called. |
|
3 |
*/ |
|
4 |
class AbstractMethodError extends Error { |
|
5 |
} |
Také k dispozici: Unified diff
created App and AbstractMethodError JS classes