debian-mirror-gitlab/app/assets/javascripts/editor/editor_lite_extension_base.js
2021-02-22 17:27:13 +05:30

11 lines
335 B
JavaScript

import { ERROR_INSTANCE_REQUIRED_FOR_EXTENSION } from './constants';
export class EditorLiteExtension {
constructor({ instance, ...options } = {}) {
if (instance) {
Object.assign(instance, options);
} else if (Object.entries(options).length) {
throw new Error(ERROR_INSTANCE_REQUIRED_FOR_EXTENSION);
}
}
}