diff --git a/eslint.config.js b/eslint.config.js index 4bae3fb2..66409945 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -58,6 +58,10 @@ export default [ "html_encode": true, "html_decode": true, "isMobile": true, + // Class Registry + "logger": true, + "def": true, + "use": true, // Libraries "saveAs": true, // FileSaver "iro": true, // iro.js color picker diff --git a/src/init_sync.js b/src/init_sync.js index bae5d2a6..44277a2f 100644 --- a/src/init_sync.js +++ b/src/init_sync.js @@ -1,3 +1,21 @@ +/** + * @global + * @function logger + * @param {Array} a - The arguments. + */ +/** + * @global + * @function use + * @param {string} arg - The string argument. + * @returns {any} The return value. + */ +/** + * @global + * @function def + * @param {any} arg - The argument. + * @returns {any} The return value. + */ + // An initial logger to log do before we get a more fancy logger // (which we never really do yet, at the time of writing this); // something like this was also done in backend and it proved useful. diff --git a/src/services/ExportRegistrantService.js b/src/services/ExportRegistrantService.js new file mode 100644 index 00000000..a404d8b9 --- /dev/null +++ b/src/services/ExportRegistrantService.js @@ -0,0 +1,13 @@ +import Spinner from "../UI/Components/Spinner"; +import { Service } from "../definitions"; + +/** + * This class exists to keep exports to the service script API separate + * from the service where exports are registered. This will make it easier + * to change how it works in the future. + */ +export class ExportRegistrantService extends Service { + _init () { + console.log(Spinner); // import gets optimized out if we don't do this + } +}