1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-03 23:50:33 +02:00

Tools: Add class member accessibility modifiers and converted rule @typescript-eslint/explicit-member-accessibility to an error

This commit is contained in:
Laurent Cozic
2023-03-06 14:22:01 +00:00
parent aa4af69afc
commit c1db7182ac
129 changed files with 1252 additions and 1296 deletions

View File

@ -39,7 +39,7 @@ export default class JoplinViewsDialogs {
private plugin: Plugin;
private implementation_: any;
constructor(implementation: any, plugin: Plugin, store: any) {
public constructor(implementation: any, plugin: Plugin, store: any) {
this.store = store;
this.plugin = plugin;
this.implementation_ = implementation;
@ -52,7 +52,7 @@ export default class JoplinViewsDialogs {
/**
* Creates a new dialog
*/
async create(id: string): Promise<ViewHandle> {
public async create(id: string): Promise<ViewHandle> {
if (!id) {
this.plugin.deprecationNotice('1.5', 'Creating a view without an ID is deprecated. To fix it, change your call to `joplin.views.dialogs.create("my-unique-id")`', true);
id = `${this.plugin.viewCount}`;
@ -67,14 +67,14 @@ export default class JoplinViewsDialogs {
/**
* Displays a message box with OK/Cancel buttons. Returns the button index that was clicked - "0" for OK and "1" for "Cancel"
*/
async showMessageBox(message: string): Promise<number> {
public async showMessageBox(message: string): Promise<number> {
return this.implementation_.showMessageBox(`${_('(In plugin: %s)', this.plugin.manifest.name)}\n\n${message}`);
}
/**
* Sets the dialog HTML content
*/
async setHtml(handle: ViewHandle, html: string) {
public async setHtml(handle: ViewHandle, html: string) {
return this.controller(handle).html = html;
}
@ -88,14 +88,14 @@ export default class JoplinViewsDialogs {
/**
* Sets the dialog buttons.
*/
async setButtons(handle: ViewHandle, buttons: ButtonSpec[]) {
public async setButtons(handle: ViewHandle, buttons: ButtonSpec[]) {
return this.controller(handle).buttons = buttons;
}
/**
* Opens the dialog
*/
async open(handle: ViewHandle): Promise<DialogResult> {
public async open(handle: ViewHandle): Promise<DialogResult> {
return this.controller(handle).open();
}
@ -104,7 +104,7 @@ export default class JoplinViewsDialogs {
* When set to false, the dialog is set to 90vw and 80vh
* @default true
*/
async setFitToContent(handle: ViewHandle, status: boolean) {
public async setFitToContent(handle: ViewHandle, status: boolean) {
return this.controller(handle).fitToContent = status;
}
}