mirror of
https://github.com/laurent22/joplin.git
synced 2025-04-04 21:35:03 +02:00
Chore: access modifiers on classes
This commit is contained in:
parent
65cc6853bd
commit
5cd9114334
@ -68,15 +68,15 @@ export default class Plugin {
|
|||||||
return Object.keys(this.viewControllers_).length;
|
return Object.keys(this.viewControllers_).length;
|
||||||
}
|
}
|
||||||
|
|
||||||
on(eventName: string, callback: Function) {
|
public on(eventName: string, callback: Function) {
|
||||||
return this.eventEmitter_.on(eventName, callback);
|
return this.eventEmitter_.on(eventName, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
off(eventName: string, callback: Function) {
|
public off(eventName: string, callback: Function) {
|
||||||
return this.eventEmitter_.removeListener(eventName, callback);
|
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);
|
return this.eventEmitter_.emit(eventName, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ export default class JoplinPlugins {
|
|||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
async register(script: Script) {
|
public async register(script: Script) {
|
||||||
if (script.onStart) {
|
if (script.onStart) {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ export default class JoplinPlugins {
|
|||||||
* @param id A unique ID for the content script.
|
* @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`.
|
* @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);
|
return this.plugin.registerContentScript(type, id, scriptPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user