Welcome to mirror list, hosted at ThFree Co, Russian Federation.

editor_lite_extension_base.js « editor « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b8d87fa4969ae83c54758dd340b7dd141a70e43c (plain)
1
2
3
4
5
6
7
8
9
10
11
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);
    }
  }
}