8
0
Просмотр исходного кода

Moved the `saveInterval` prpoperty to the `WatchdogConfig` typedef.

Maciej Bukowski 6 лет назад
Родитель
Сommit
ce8942f981

+ 2 - 11
packages/ckeditor5-watchdog/src/editorwatchdog.js

@@ -22,7 +22,7 @@ import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
  */
 export default class EditorWatchdog extends Watchdog {
 	/**
-	 * @param {module:watchdog/editorwatchdog~EditorWatchdogConfig} [config] The watchdog plugin configuration.
+	 * @param {module:watchdog/watchdog~WatchdogConfig} [config] The watchdog plugin configuration.
 	 */
 	constructor( config = {} ) {
 		super( config );
@@ -338,7 +338,7 @@ export default class EditorWatchdog extends Watchdog {
 	 *		watchdog.create( elementOrData, config );
 	 *
 	 * @param {*} Editor The editor class.
-	 * @param {module:watchdog/editorwatchdog~EditorWatchdogConfig} [watchdogConfig] The watchdog plugin configuration.
+	 * @param {module:watchdog/watchdog~WatchdogConfig} [watchdogConfig] The watchdog plugin configuration.
 	 */
 	static for( Editor, watchdogConfig ) {
 		const watchdog = new this( watchdogConfig );
@@ -354,12 +354,3 @@ export default class EditorWatchdog extends Watchdog {
 	 * @event restart
 	 */
 }
-
-/**
- * The editor watchdog plugin configuration.
- *
- * @typedef {WatchdogConfig} EditorWatchdogConfig
- *
- * @property {Number} [saveInterval=5000] A minimum number of milliseconds between saving editor data internally, (defaults to 5000).
- * Note that for large documents this might have an impact on the editor performance.
- */

+ 4 - 0
packages/ckeditor5-watchdog/src/watchdog.js

@@ -288,7 +288,11 @@ mix( Watchdog, ObservableMixin );
  * when the watchdog stops restarting the instance in case of errors.
  * After this limit is reached and the time between last errors is shorter than `minimumNonErrorTimePeriod`
  * the watchdog changes its state to `crashedPermanently` and it stops restarting the instance. This prevents an infinite restart loop.
+ *
  * @property {Number} [minimumNonErrorTimePeriod=5000] An average amount of milliseconds between last instance errors
  * (defaults to 5000). When the period of time between errors is lower than that and the `crashNumberLimit` is also reached
  * the watchdog changes its state to `crashedPermanently` and it stops restarting the instance. This prevents an infinite restart loop.
+ *
+ * @property {Number} [saveInterval=5000] A minimum number of milliseconds between saving editor data internally, (defaults to 5000).
+ * Note that for large documents this might have an impact on the editor performance.
  */