From 5cd9114334c12554a0d23c9fd2ba24424a7a3330 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 11 Dec 2020 12:29:21 +0000 Subject: [PATCH] Chore: access modifiers on classes --- packages/lib/services/plugins/Plugin.ts | 6 +++--- packages/lib/services/plugins/api/JoplinPlugins.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/lib/services/plugins/Plugin.ts b/packages/lib/services/plugins/Plugin.ts index 5ba883724..cf85018af 100644 --- a/packages/lib/services/plugins/Plugin.ts +++ b/packages/lib/services/plugins/Plugin.ts @@ -68,15 +68,15 @@ export default class Plugin { return Object.keys(this.viewControllers_).length; } - on(eventName: string, callback: Function) { + public on(eventName: string, callback: Function) { return this.eventEmitter_.on(eventName, callback); } - off(eventName: string, callback: Function) { + public off(eventName: string, callback: Function) { return this.eventEmitter_.removeListener(eventName, callback); } - emit(eventName: string, event: any = null) { + public emit(eventName: string, event: any = null) { return this.eventEmitter_.emit(eventName, event); } diff --git a/packages/lib/services/plugins/api/JoplinPlugins.ts b/packages/lib/services/plugins/api/JoplinPlugins.ts index af0cbee13..fce2a1b6c 100644 --- a/packages/lib/services/plugins/api/JoplinPlugins.ts +++ b/packages/lib/services/plugins/api/JoplinPlugins.ts @@ -27,7 +27,7 @@ export default class JoplinPlugins { * }); * ``` */ - async register(script: Script) { + public async register(script: Script) { if (script.onStart) { const startTime = Date.now(); @@ -70,7 +70,7 @@ export default class JoplinPlugins { * @param id A unique ID for the content script. * @param scriptPath Must be a path relative to the plugin main script. For example, if your file content_script.js is next to your index.ts file, you would set `scriptPath` to `"./content_script.js`. */ - async registerContentScript(type: ContentScriptType, id: string, scriptPath: string) { + public async registerContentScript(type: ContentScriptType, id: string, scriptPath: string) { return this.plugin.registerContentScript(type, id, scriptPath); } }