Adrià Vilanova MartÃnez | 0d92a0c | 2023-11-06 01:37:20 +0100 | [diff] [blame] | 1 | import {shouldImplement} from '../../../../common/commonUtils.js'; |
| 2 | |
| 3 | export default class BaseInfoHandler { |
| 4 | constructor() { |
| 5 | if (this.constructor == BaseInfoHandler) { |
| 6 | throw new Error('The base class cannot be instantiated.'); |
| 7 | } |
| 8 | } |
| 9 | |
| 10 | /** |
| 11 | * Should return a promise which resolves to the current info in a best-effort |
| 12 | * manner (if it can't retrieve the current info it is allowed to fail). |
| 13 | */ |
| 14 | async getCurrentInfo(_injectionDetails) { |
| 15 | shouldImplement('getCurrentInfo'); |
| 16 | } |
| 17 | } |