You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-06 09:19:22 +02:00
Tools: Apply rule @typescript-eslint/member-delimiter-style
This commit is contained in:
@@ -10,16 +10,16 @@ export enum ButtonLevel {
|
||||
}
|
||||
|
||||
interface Props {
|
||||
title?: string,
|
||||
iconName?: string,
|
||||
level?: ButtonLevel,
|
||||
className?: string,
|
||||
onClick: Function,
|
||||
color?: string,
|
||||
iconAnimation?: string,
|
||||
tooltip?: string,
|
||||
disabled?: boolean,
|
||||
style?: any,
|
||||
title?: string;
|
||||
iconName?: string;
|
||||
level?: ButtonLevel;
|
||||
className?: string;
|
||||
onClick: Function;
|
||||
color?: string;
|
||||
iconAnimation?: string;
|
||||
tooltip?: string;
|
||||
disabled?: boolean;
|
||||
style?: any;
|
||||
}
|
||||
|
||||
const StyledTitle = styled.span`
|
||||
|
||||
@@ -4,11 +4,11 @@ import { _ } from '@joplin/lib/locale';
|
||||
const styled = require('styled-components').default;
|
||||
|
||||
interface Props {
|
||||
backButtonTitle?: string,
|
||||
hasChanges?: boolean,
|
||||
onCancelClick: Function,
|
||||
onSaveClick?: Function,
|
||||
onApplyClick?: Function,
|
||||
backButtonTitle?: string;
|
||||
hasChanges?: boolean;
|
||||
onCancelClick: Function;
|
||||
onSaveClick?: Function;
|
||||
onApplyClick?: Function;
|
||||
}
|
||||
|
||||
export const StyledRoot = styled.div`
|
||||
|
||||
@@ -3,9 +3,9 @@ const styled = require('styled-components').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
|
||||
interface Props {
|
||||
selection: string,
|
||||
onSelectionChange: Function,
|
||||
sections: any[],
|
||||
selection: string;
|
||||
onSelectionChange: Function;
|
||||
sections: any[];
|
||||
}
|
||||
|
||||
export const StyledRoot = styled.div`
|
||||
|
||||
@@ -8,7 +8,7 @@ const { themeStyle } = require('@joplin/lib/theme');
|
||||
const Shared = require('@joplin/lib/components/shared/dropbox-login-shared');
|
||||
|
||||
interface Props {
|
||||
themeId: string,
|
||||
themeId: string;
|
||||
}
|
||||
|
||||
class DropboxLoginScreenComponent extends React.Component<any, any> {
|
||||
|
||||
@@ -15,7 +15,7 @@ const shim = require('@joplin/lib/shim').default;
|
||||
const keymapService = KeymapService.instance();
|
||||
|
||||
export interface KeymapConfigScreenProps {
|
||||
themeId: number
|
||||
themeId: number;
|
||||
}
|
||||
|
||||
export const KeymapConfigScreen = ({ themeId }: KeymapConfigScreenProps) => {
|
||||
@@ -27,7 +27,7 @@ export const KeymapConfigScreen = ({ themeId }: KeymapConfigScreenProps) => {
|
||||
const [editing, enableEditing, disableEditing] = useCommandStatus();
|
||||
const [hovering, enableHovering, disableHovering] = useCommandStatus();
|
||||
|
||||
const handleSave = (event: { commandName: string, accelerator: string }) => {
|
||||
const handleSave = (event: { commandName: string; accelerator: string }) => {
|
||||
const { commandName, accelerator } = event;
|
||||
setAccelerator(commandName, accelerator);
|
||||
disableEditing(commandName);
|
||||
|
||||
@@ -8,13 +8,13 @@ import { _ } from '@joplin/lib/locale';
|
||||
const keymapService = KeymapService.instance();
|
||||
|
||||
export interface ShortcutRecorderProps {
|
||||
onSave: (event: { commandName: string, accelerator: string })=> void,
|
||||
onReset: (event: { commandName: string })=> void,
|
||||
onCancel: (event: { commandName: string })=> void,
|
||||
onError: (event: { recorderError: Error })=> void,
|
||||
initialAccelerator: string
|
||||
commandName: string,
|
||||
themeId: number
|
||||
onSave: (event: { commandName: string; accelerator: string })=> void;
|
||||
onReset: (event: { commandName: string })=> void;
|
||||
onCancel: (event: { commandName: string })=> void;
|
||||
onError: (event: { recorderError: Error })=> void;
|
||||
initialAccelerator: string;
|
||||
commandName: string;
|
||||
themeId: number;
|
||||
}
|
||||
|
||||
export const ShortcutRecorder = ({ onSave, onReset, onCancel, onError, initialAccelerator, commandName, themeId }: ShortcutRecorderProps) => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import KeymapService from '@joplin/lib/services/KeymapService';
|
||||
const keymapService = KeymapService.instance();
|
||||
|
||||
interface CommandStatus {
|
||||
[commandName: string]: boolean
|
||||
[commandName: string]: boolean;
|
||||
}
|
||||
|
||||
const useCommandStatus = (): [CommandStatus, (commandName: string)=> void, (commandName: string)=> void] => {
|
||||
|
||||
@@ -72,22 +72,22 @@ function createPluginMenuTree(label: string, menuItems: MenuItem[], onMenuItemCl
|
||||
}
|
||||
|
||||
interface Props {
|
||||
dispatch: Function,
|
||||
menuItemProps: any,
|
||||
routeName: string,
|
||||
selectedFolderId: string,
|
||||
layoutButtonSequence: number,
|
||||
['notes.sortOrder.field']: string,
|
||||
['folders.sortOrder.field']: string,
|
||||
['notes.sortOrder.reverse']: boolean,
|
||||
['folders.sortOrder.reverse']: boolean,
|
||||
showNoteCounts: boolean,
|
||||
uncompletedTodosOnTop: boolean,
|
||||
showCompletedTodos: boolean,
|
||||
pluginMenuItems: any[],
|
||||
pluginMenus: any[],
|
||||
['spellChecker.enabled']: boolean,
|
||||
['spellChecker.language']: string,
|
||||
dispatch: Function;
|
||||
menuItemProps: any;
|
||||
routeName: string;
|
||||
selectedFolderId: string;
|
||||
layoutButtonSequence: number;
|
||||
['notes.sortOrder.field']: string;
|
||||
['folders.sortOrder.field']: string;
|
||||
['notes.sortOrder.reverse']: boolean;
|
||||
['folders.sortOrder.reverse']: boolean;
|
||||
showNoteCounts: boolean;
|
||||
uncompletedTodosOnTop: boolean;
|
||||
showCompletedTodos: boolean;
|
||||
pluginMenuItems: any[];
|
||||
pluginMenus: any[];
|
||||
['spellChecker.enabled']: boolean;
|
||||
['spellChecker.language']: string;
|
||||
}
|
||||
|
||||
const commandNames: string[] = menuCommandNames();
|
||||
|
||||
@@ -6,12 +6,12 @@ const { buildStyle } = require('@joplin/lib/theme');
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
|
||||
interface MultiNoteActionsProps {
|
||||
themeId: number,
|
||||
selectedNoteIds: string[],
|
||||
notes: any[],
|
||||
dispatch: Function,
|
||||
watchedNoteFiles: string[],
|
||||
plugins: PluginStates,
|
||||
themeId: number;
|
||||
selectedNoteIds: string[];
|
||||
notes: any[];
|
||||
dispatch: Function;
|
||||
watchedNoteFiles: string[];
|
||||
plugins: PluginStates;
|
||||
}
|
||||
|
||||
function styles_(props: MultiNoteActionsProps) {
|
||||
|
||||
@@ -7,10 +7,10 @@ const Countable = require('countable');
|
||||
const markupLanguageUtils = require('@joplin/lib/markupLanguageUtils').default;
|
||||
|
||||
interface NoteContentPropertiesDialogProps {
|
||||
themeId: number,
|
||||
text: string,
|
||||
markupLanguage: number,
|
||||
onClose: Function,
|
||||
themeId: number;
|
||||
text: string;
|
||||
markupLanguage: number;
|
||||
onClose: Function;
|
||||
}
|
||||
|
||||
interface TextPropertiesMap {
|
||||
|
||||
@@ -324,7 +324,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
||||
let cancelled = false;
|
||||
|
||||
async function loadScripts() {
|
||||
const scriptsToLoad: {src: string, id: string, loaded: boolean}[] = [
|
||||
const scriptsToLoad: {src: string; id: string; loaded: boolean}[] = [
|
||||
{
|
||||
src: 'node_modules/codemirror/addon/dialog/dialog.css',
|
||||
id: 'codemirrorDialogStyle',
|
||||
|
||||
@@ -75,18 +75,18 @@ for (let i = 0; i < topLanguages.length; i++) {
|
||||
}
|
||||
|
||||
export interface EditorProps {
|
||||
value: string,
|
||||
searchMarkers: any,
|
||||
mode: string,
|
||||
style: any,
|
||||
codeMirrorTheme: any,
|
||||
readOnly: boolean,
|
||||
autoMatchBraces: boolean,
|
||||
keyMap: string,
|
||||
onChange: any,
|
||||
onScroll: any,
|
||||
onEditorContextMenu: any,
|
||||
onEditorPaste: any,
|
||||
value: string;
|
||||
searchMarkers: any;
|
||||
mode: string;
|
||||
style: any;
|
||||
codeMirrorTheme: any;
|
||||
readOnly: boolean;
|
||||
autoMatchBraces: boolean;
|
||||
keyMap: string;
|
||||
onChange: any;
|
||||
onScroll: any;
|
||||
onEditorContextMenu: any;
|
||||
onEditorPaste: any;
|
||||
}
|
||||
|
||||
function Editor(props: EditorProps, ref: any) {
|
||||
|
||||
@@ -9,8 +9,8 @@ import stateToWhenClauseContext from '@joplin/lib/services/commands/stateToWhenC
|
||||
const { buildStyle } = require('@joplin/lib/theme');
|
||||
|
||||
interface ToolbarProps {
|
||||
themeId: number,
|
||||
toolbarButtonInfos: ToolbarButtonInfo[],
|
||||
themeId: number;
|
||||
toolbarButtonInfos: ToolbarButtonInfo[];
|
||||
}
|
||||
|
||||
function styles_(props: ToolbarProps) {
|
||||
|
||||
@@ -34,7 +34,7 @@ export default function useJoplinMode(CodeMirror: any) {
|
||||
}
|
||||
|
||||
return {
|
||||
startState: function(): { outer: any, openCharacter: string, inner: any } {
|
||||
startState: function(): { outer: any; openCharacter: string; inner: any } {
|
||||
return {
|
||||
outer: CodeMirror.startState(markdownMode),
|
||||
openCharacter: '',
|
||||
|
||||
@@ -109,13 +109,13 @@ function enableTextAreaTab(enable: boolean) {
|
||||
}
|
||||
|
||||
interface TinyMceCommand {
|
||||
name: string,
|
||||
value?: any,
|
||||
ui?: boolean
|
||||
name: string;
|
||||
value?: any;
|
||||
ui?: boolean;
|
||||
}
|
||||
|
||||
interface JoplinCommandToTinyMceCommands {
|
||||
[key: string]: TinyMceCommand,
|
||||
[key: string]: TinyMceCommand;
|
||||
}
|
||||
|
||||
const joplinCommandToTinyMceCommands: JoplinCommandToTinyMceCommands = {
|
||||
|
||||
@@ -24,7 +24,7 @@ function contextMenuElement(editor: any, x: number, y: number) {
|
||||
}
|
||||
|
||||
interface ContextMenuActionOptions {
|
||||
current: ContextMenuOptions,
|
||||
current: ContextMenuOptions;
|
||||
}
|
||||
|
||||
const contextMenuActionOptions: ContextMenuActionOptions = { current: null };
|
||||
|
||||
@@ -2,8 +2,8 @@ import { useEffect, useCallback, useRef } from 'react';
|
||||
import shim from '@joplin/lib/shim';
|
||||
|
||||
interface HookDependencies {
|
||||
editor: any,
|
||||
onScroll: Function,
|
||||
editor: any;
|
||||
onScroll: Function;
|
||||
}
|
||||
|
||||
export default function useScroll(dependencies: HookDependencies) {
|
||||
|
||||
@@ -7,13 +7,13 @@ import { buildStyle } from '@joplin/lib/theme';
|
||||
import time from '@joplin/lib/time';
|
||||
|
||||
interface Props {
|
||||
themeId: number,
|
||||
noteUserUpdatedTime: number,
|
||||
noteTitle: string,
|
||||
noteIsTodo: number,
|
||||
isProvisional: boolean,
|
||||
titleInputRef: any,
|
||||
onTitleChange(event: ChangeEvent<HTMLInputElement>): void,
|
||||
themeId: number;
|
||||
noteUserUpdatedTime: number;
|
||||
noteTitle: string;
|
||||
noteIsTodo: number;
|
||||
isProvisional: boolean;
|
||||
titleInputRef: any;
|
||||
onTitleChange(event: ChangeEvent<HTMLInputElement>): void;
|
||||
}
|
||||
|
||||
function styles_(props: Props) {
|
||||
|
||||
@@ -18,19 +18,19 @@ export enum ContextMenuItemType {
|
||||
}
|
||||
|
||||
export interface ContextMenuOptions {
|
||||
itemType: ContextMenuItemType,
|
||||
resourceId: string,
|
||||
linkToCopy: string,
|
||||
textToCopy: string,
|
||||
htmlToCopy: string,
|
||||
insertContent: Function,
|
||||
isReadOnly?: boolean,
|
||||
itemType: ContextMenuItemType;
|
||||
resourceId: string;
|
||||
linkToCopy: string;
|
||||
textToCopy: string;
|
||||
htmlToCopy: string;
|
||||
insertContent: Function;
|
||||
isReadOnly?: boolean;
|
||||
}
|
||||
|
||||
interface ContextMenuItem {
|
||||
label: string,
|
||||
onAction: Function,
|
||||
isActive: Function,
|
||||
label: string;
|
||||
onAction: Function;
|
||||
isActive: Function;
|
||||
}
|
||||
|
||||
interface ContextMenuItems {
|
||||
|
||||
@@ -24,25 +24,25 @@ export interface NoteEditorProps {
|
||||
selectedNoteTags: any[];
|
||||
lastEditorScrollPercents: any;
|
||||
selectedNoteHash: string;
|
||||
searches: any[],
|
||||
selectedSearchId: string,
|
||||
customCss: string,
|
||||
noteVisiblePanes: string[],
|
||||
watchedResources: any,
|
||||
highlightedWords: any[],
|
||||
plugins: PluginStates,
|
||||
toolbarButtonInfos: ToolbarButtonInfo[],
|
||||
setTagsToolbarButtonInfo: ToolbarButtonInfo,
|
||||
searches: any[];
|
||||
selectedSearchId: string;
|
||||
customCss: string;
|
||||
noteVisiblePanes: string[];
|
||||
watchedResources: any;
|
||||
highlightedWords: any[];
|
||||
plugins: PluginStates;
|
||||
toolbarButtonInfos: ToolbarButtonInfo[];
|
||||
setTagsToolbarButtonInfo: ToolbarButtonInfo;
|
||||
}
|
||||
|
||||
export interface NoteBodyEditorProps {
|
||||
style: any;
|
||||
ref: any,
|
||||
ref: any;
|
||||
themeId: number;
|
||||
content: string,
|
||||
contentKey: string,
|
||||
contentMarkupLanguage: number,
|
||||
contentOriginalCss: string,
|
||||
content: string;
|
||||
contentKey: string;
|
||||
contentMarkupLanguage: number;
|
||||
contentOriginalCss: string;
|
||||
onChange(event: OnChangeEvent): void;
|
||||
onWillChange(event: any): void;
|
||||
onMessage(event: any): void;
|
||||
@@ -53,29 +53,29 @@ export interface NoteBodyEditorProps {
|
||||
disabled: boolean;
|
||||
dispatch: Function;
|
||||
noteToolbar: any;
|
||||
setLocalSearchResultCount(count: number): void,
|
||||
searchMarkers: any,
|
||||
visiblePanes: string[],
|
||||
keyboardMode: string,
|
||||
resourceInfos: ResourceInfos,
|
||||
locale: string,
|
||||
onDrop: Function,
|
||||
noteToolbarButtonInfos: ToolbarButtonInfo[],
|
||||
plugins: PluginStates,
|
||||
setLocalSearchResultCount(count: number): void;
|
||||
searchMarkers: any;
|
||||
visiblePanes: string[];
|
||||
keyboardMode: string;
|
||||
resourceInfos: ResourceInfos;
|
||||
locale: string;
|
||||
onDrop: Function;
|
||||
noteToolbarButtonInfos: ToolbarButtonInfo[];
|
||||
plugins: PluginStates;
|
||||
}
|
||||
|
||||
export interface FormNote {
|
||||
id: string,
|
||||
title: string,
|
||||
body: string,
|
||||
parent_id: string,
|
||||
is_todo: number,
|
||||
bodyEditorContent?: any,
|
||||
markup_language: number,
|
||||
user_updated_time: number,
|
||||
encryption_applied: number,
|
||||
id: string;
|
||||
title: string;
|
||||
body: string;
|
||||
parent_id: string;
|
||||
is_todo: number;
|
||||
bodyEditorContent?: any;
|
||||
markup_language: number;
|
||||
user_updated_time: number;
|
||||
encryption_applied: number;
|
||||
|
||||
hasChanged: boolean,
|
||||
hasChanged: boolean;
|
||||
|
||||
// Getting the content from the editor can be a slow process because that content
|
||||
// might need to be serialized first. For that reason, the wrapped editor (eg TinyMCE)
|
||||
@@ -93,10 +93,10 @@ export interface FormNote {
|
||||
// types something then quickly switch a different note. In that case, bodyWillChangeId
|
||||
// is set, thus we know we should save the note, even though we won't receive the
|
||||
// onChange event.
|
||||
bodyWillChangeId: number
|
||||
bodyChangeId: number,
|
||||
bodyWillChangeId: number;
|
||||
bodyChangeId: number;
|
||||
|
||||
saveActionQueue: AsyncActionQueue,
|
||||
saveActionQueue: AsyncActionQueue;
|
||||
|
||||
// Note with markup_language = HTML have a block of CSS at the start, which is used
|
||||
// to preserve the style from the original (web-clipped) page. When sending the note
|
||||
@@ -106,7 +106,7 @@ export interface FormNote {
|
||||
// Since the CSS used by TinyMCE has been lost (since it's in a temp CSS file), we keep that
|
||||
// original CSS here. It's used in formNoteToNote to rebuild the note body.
|
||||
// We can keep it here because we know TinyMCE will not modify it anyway.
|
||||
originalCss: string,
|
||||
originalCss: string;
|
||||
}
|
||||
|
||||
export function defaultFormNote(): FormNote {
|
||||
@@ -128,12 +128,12 @@ export function defaultFormNote(): FormNote {
|
||||
}
|
||||
|
||||
export interface ResourceInfo {
|
||||
localState: any,
|
||||
item: any,
|
||||
localState: any;
|
||||
item: any;
|
||||
}
|
||||
|
||||
export interface ResourceInfos {
|
||||
[index: string]: ResourceInfo,
|
||||
[index: string]: ResourceInfo;
|
||||
}
|
||||
|
||||
export enum ScrollOptionTypes {
|
||||
@@ -143,8 +143,8 @@ export enum ScrollOptionTypes {
|
||||
}
|
||||
|
||||
export interface ScrollOptions {
|
||||
type: ScrollOptionTypes,
|
||||
value: any,
|
||||
type: ScrollOptionTypes;
|
||||
value: any;
|
||||
}
|
||||
|
||||
export interface OnChangeEvent {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useCallback } from 'react';
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
|
||||
interface HookDependencies {
|
||||
editorRef: any,
|
||||
editorRef: any;
|
||||
}
|
||||
|
||||
export default function useDropHandler(dependencies: HookDependencies) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
|
||||
interface HookDependencies {
|
||||
folderId: string,
|
||||
folderId: string;
|
||||
}
|
||||
|
||||
export default function(dependencies: HookDependencies) {
|
||||
|
||||
@@ -14,17 +14,17 @@ const DecryptionWorker = require('@joplin/lib/services/DecryptionWorker.js');
|
||||
const ResourceEditWatcher = require('@joplin/lib/services/ResourceEditWatcher/index').default;
|
||||
|
||||
export interface OnLoadEvent {
|
||||
formNote: FormNote,
|
||||
formNote: FormNote;
|
||||
}
|
||||
|
||||
interface HookDependencies {
|
||||
syncStarted: boolean,
|
||||
noteId: string,
|
||||
isProvisional: boolean,
|
||||
titleInputRef: any,
|
||||
editorRef: any,
|
||||
onBeforeLoad(event: OnLoadEvent): void,
|
||||
onAfterLoad(event: OnLoadEvent): void,
|
||||
syncStarted: boolean;
|
||||
noteId: string;
|
||||
isProvisional: boolean;
|
||||
titleInputRef: any;
|
||||
editorRef: any;
|
||||
onBeforeLoad(event: OnLoadEvent): void;
|
||||
onAfterLoad(event: OnLoadEvent): void;
|
||||
}
|
||||
|
||||
function installResourceChangeHandler(onResourceChangeHandler: Function) {
|
||||
|
||||
@@ -9,14 +9,14 @@ const { themeStyle } = require('@joplin/lib/theme');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
|
||||
interface HookDependencies {
|
||||
themeId: number,
|
||||
customCss: string,
|
||||
plugins: PluginStates,
|
||||
themeId: number;
|
||||
customCss: string;
|
||||
plugins: PluginStates;
|
||||
}
|
||||
|
||||
interface MarkupToHtmlOptions {
|
||||
replaceResourceInternalToExternalLinks?: boolean,
|
||||
resourceInfos?: ResourceInfos,
|
||||
replaceResourceInternalToExternalLinks?: boolean;
|
||||
resourceInfos?: ResourceInfos;
|
||||
}
|
||||
|
||||
export default function useMarkupToHtml(deps: HookDependencies) {
|
||||
|
||||
@@ -2,11 +2,11 @@ import { useState, useCallback } from 'react';
|
||||
import { SearchMarkers } from './useSearchMarkers';
|
||||
|
||||
interface LocalSearch {
|
||||
query: string,
|
||||
selectedIndex: number,
|
||||
resultCount: number,
|
||||
searching: boolean,
|
||||
timestamp: number,
|
||||
query: string;
|
||||
selectedIndex: number;
|
||||
resultCount: number;
|
||||
searching: boolean;
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
function defaultLocalSearch(): LocalSearch {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { useMemo } from 'react';
|
||||
|
||||
interface SearchMarkersOptions {
|
||||
searchTimestamp: number,
|
||||
selectedIndex: number,
|
||||
separateWordSearch: boolean,
|
||||
searchTimestamp: number;
|
||||
selectedIndex: number;
|
||||
separateWordSearch: boolean;
|
||||
}
|
||||
|
||||
export interface SearchMarkers {
|
||||
keywords: any[],
|
||||
options: SearchMarkersOptions,
|
||||
keywords: any[];
|
||||
options: SearchMarkersOptions;
|
||||
}
|
||||
|
||||
function defaultSearchMarkers(): SearchMarkers {
|
||||
|
||||
@@ -12,13 +12,13 @@ const commandsWithDependencies = [
|
||||
];
|
||||
|
||||
interface HookDependencies {
|
||||
formNote: FormNote,
|
||||
setShowLocalSearch: Function,
|
||||
dispatch: Function,
|
||||
noteSearchBarRef: any,
|
||||
editorRef: any,
|
||||
titleInputRef: any,
|
||||
saveNoteAndWait: Function,
|
||||
formNote: FormNote;
|
||||
setShowLocalSearch: Function;
|
||||
dispatch: Function;
|
||||
noteSearchBarRef: any;
|
||||
editorRef: any;
|
||||
titleInputRef: any;
|
||||
saveNoteAndWait: Function;
|
||||
}
|
||||
|
||||
function editorCommandRuntime(declaration: CommandDeclaration, editorRef: any): CommandRuntime {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { runtime as focusSearchRuntime } from './commands/focusSearch';
|
||||
const styled = require('styled-components').default;
|
||||
|
||||
interface Props {
|
||||
showNewNoteButtons: boolean,
|
||||
showNewNoteButtons: boolean;
|
||||
}
|
||||
|
||||
const StyledRoot = styled.div`
|
||||
|
||||
@@ -41,24 +41,24 @@ const StyledRoot = styled.div`
|
||||
`;
|
||||
|
||||
interface NoteListItemProps {
|
||||
themeId: number,
|
||||
width: number,
|
||||
height: number,
|
||||
style: any,
|
||||
dragItemIndex: number,
|
||||
highlightedWords: string[],
|
||||
index: number,
|
||||
isProvisional: boolean,
|
||||
isSelected: boolean,
|
||||
isWatched: boolean
|
||||
item: any,
|
||||
itemCount: number,
|
||||
onCheckboxClick: any,
|
||||
onDragStart: any,
|
||||
onNoteDragOver: any,
|
||||
onNoteDrop: any,
|
||||
onTitleClick: any,
|
||||
onContextMenu(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>): void,
|
||||
themeId: number;
|
||||
width: number;
|
||||
height: number;
|
||||
style: any;
|
||||
dragItemIndex: number;
|
||||
highlightedWords: string[];
|
||||
index: number;
|
||||
isProvisional: boolean;
|
||||
isSelected: boolean;
|
||||
isWatched: boolean;
|
||||
item: any;
|
||||
itemCount: number;
|
||||
onCheckboxClick: any;
|
||||
onDragStart: any;
|
||||
onNoteDragOver: any;
|
||||
onNoteDrop: any;
|
||||
onTitleClick: any;
|
||||
onContextMenu(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
||||
}
|
||||
|
||||
function NoteListItem(props: NoteListItemProps, ref: any) {
|
||||
|
||||
@@ -3,9 +3,9 @@ const { connect } = require('react-redux');
|
||||
const { reg } = require('@joplin/lib/registry.js');
|
||||
|
||||
interface Props {
|
||||
onDomReady: Function,
|
||||
onIpcMessage: Function,
|
||||
viewerStyle: any,
|
||||
onDomReady: Function;
|
||||
onIpcMessage: Function;
|
||||
viewerStyle: any;
|
||||
}
|
||||
|
||||
class NoteTextViewerComponent extends React.Component<Props, any> {
|
||||
|
||||
@@ -8,9 +8,9 @@ const { connect } = require('react-redux');
|
||||
const { buildStyle } = require('@joplin/lib/theme');
|
||||
|
||||
interface NoteToolbarProps {
|
||||
themeId: number,
|
||||
style: any,
|
||||
toolbarButtonInfos: ToolbarButtonInfo[],
|
||||
themeId: number;
|
||||
style: any;
|
||||
toolbarButtonInfos: ToolbarButtonInfo[];
|
||||
}
|
||||
|
||||
function styles_(props: NoteToolbarProps) {
|
||||
|
||||
@@ -10,7 +10,7 @@ const { themeStyle } = require('@joplin/lib/theme');
|
||||
const { OneDriveApiNodeUtils } = require('@joplin/lib/onedrive-api-node-utils.js');
|
||||
|
||||
interface Props {
|
||||
themeId: string,
|
||||
themeId: string;
|
||||
}
|
||||
|
||||
class OneDriveLoginScreenComponent extends React.Component<any, any> {
|
||||
|
||||
@@ -14,34 +14,34 @@ export enum LayoutItemDirection {
|
||||
}
|
||||
|
||||
export interface Size {
|
||||
width: number,
|
||||
height: number,
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
export interface LayoutItem {
|
||||
key: string,
|
||||
width?: number,
|
||||
height?: number,
|
||||
minWidth?: number,
|
||||
minHeight?: number,
|
||||
children?: LayoutItem[]
|
||||
direction?: LayoutItemDirection,
|
||||
resizableRight?: boolean,
|
||||
resizableBottom?: boolean,
|
||||
visible?: boolean,
|
||||
context?: any,
|
||||
key: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
minWidth?: number;
|
||||
minHeight?: number;
|
||||
children?: LayoutItem[];
|
||||
direction?: LayoutItemDirection;
|
||||
resizableRight?: boolean;
|
||||
resizableBottom?: boolean;
|
||||
visible?: boolean;
|
||||
context?: any;
|
||||
}
|
||||
|
||||
interface onResizeEvent {
|
||||
layout: LayoutItem
|
||||
layout: LayoutItem;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
layout: LayoutItem,
|
||||
layout: LayoutItem;
|
||||
onResize(event: onResizeEvent): void;
|
||||
width?: number,
|
||||
height?: number,
|
||||
renderItem: Function,
|
||||
width?: number;
|
||||
height?: number;
|
||||
renderItem: Function;
|
||||
}
|
||||
|
||||
export function allDynamicSizes(layout: LayoutItem): any {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
|
||||
import { LayoutItem, Size, dragBarThickness } from '../ResizableLayout';
|
||||
|
||||
export interface LayoutItemSizes {
|
||||
[key: string]: Size,
|
||||
[key: string]: Size;
|
||||
}
|
||||
|
||||
export function itemSize(item: LayoutItem, sizes: LayoutItemSizes): Size {
|
||||
|
||||
@@ -9,45 +9,45 @@ const prettyBytes = require('pretty-bytes');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
|
||||
interface Style {
|
||||
width: number
|
||||
height: number
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
themeId: number;
|
||||
style: Style,
|
||||
dispatch: Function,
|
||||
style: Style;
|
||||
dispatch: Function;
|
||||
}
|
||||
|
||||
interface InnerResource {
|
||||
title: string
|
||||
id: string
|
||||
size: number
|
||||
file_extension: string
|
||||
title: string;
|
||||
id: string;
|
||||
size: number;
|
||||
file_extension: string;
|
||||
}
|
||||
|
||||
interface State {
|
||||
resources: InnerResource[] | undefined
|
||||
sorting: ActiveSorting
|
||||
isLoading: boolean
|
||||
resources: InnerResource[] | undefined;
|
||||
sorting: ActiveSorting;
|
||||
isLoading: boolean;
|
||||
}
|
||||
|
||||
interface ResourceTable {
|
||||
resources: InnerResource[]
|
||||
sorting: ActiveSorting
|
||||
onResourceClick: (resource: InnerResource)=> any
|
||||
onResourceDelete: (resource: InnerResource)=> any
|
||||
onToggleSorting: (order: SortingOrder)=> any
|
||||
themeId: number
|
||||
style: Style
|
||||
resources: InnerResource[];
|
||||
sorting: ActiveSorting;
|
||||
onResourceClick: (resource: InnerResource)=> any;
|
||||
onResourceDelete: (resource: InnerResource)=> any;
|
||||
onToggleSorting: (order: SortingOrder)=> any;
|
||||
themeId: number;
|
||||
style: Style;
|
||||
}
|
||||
|
||||
type SortingOrder = 'size' | 'name'
|
||||
type SortingType = 'asc' | 'desc'
|
||||
type SortingOrder = 'size' | 'name';
|
||||
type SortingType = 'asc' | 'desc';
|
||||
|
||||
interface ActiveSorting {
|
||||
order: SortingOrder
|
||||
type: SortingType
|
||||
order: SortingOrder;
|
||||
type: SortingType;
|
||||
}
|
||||
|
||||
const ResourceTableComp = (props: ResourceTable) => {
|
||||
|
||||
@@ -24,11 +24,11 @@ const { ThemeProvider, StyleSheetManager, createGlobalStyle } = require('styled-
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
|
||||
interface Props {
|
||||
themeId: number,
|
||||
appState: string,
|
||||
dispatch: Function,
|
||||
size: Size,
|
||||
zoomFactor: number,
|
||||
themeId: number;
|
||||
appState: string;
|
||||
dispatch: Function;
|
||||
size: Size;
|
||||
zoomFactor: number;
|
||||
}
|
||||
|
||||
const GlobalStyle = createGlobalStyle`
|
||||
|
||||
@@ -13,10 +13,10 @@ const Note = require('@joplin/lib/models/Note');
|
||||
const debounce = require('debounce');
|
||||
|
||||
interface Props {
|
||||
inputRef?: any,
|
||||
notesParentType: string,
|
||||
dispatch?: Function,
|
||||
selectedNoteId: string,
|
||||
inputRef?: any;
|
||||
notesParentType: string;
|
||||
dispatch?: Function;
|
||||
selectedNoteId: string;
|
||||
}
|
||||
|
||||
function SearchBar(props: Props) {
|
||||
|
||||
@@ -12,9 +12,9 @@ const { reg } = require('@joplin/lib/registry.js');
|
||||
const { clipboard } = require('electron');
|
||||
|
||||
interface ShareNoteDialogProps {
|
||||
themeId: number,
|
||||
noteIds: Array<string>,
|
||||
onClose: Function,
|
||||
themeId: number;
|
||||
noteIds: Array<string>;
|
||||
onClose: Function;
|
||||
}
|
||||
|
||||
interface SharesMap {
|
||||
|
||||
@@ -23,24 +23,24 @@ const { substrWithEllipsis } = require('@joplin/lib/string-utils');
|
||||
const { ALL_NOTES_FILTER_ID } = require('@joplin/lib/reserved-ids');
|
||||
|
||||
interface Props {
|
||||
themeId: number,
|
||||
dispatch: Function,
|
||||
folders: any[],
|
||||
collapsedFolderIds: string[],
|
||||
notesParentType: string,
|
||||
selectedFolderId: string,
|
||||
selectedTagId: string,
|
||||
selectedSmartFilterId: string,
|
||||
decryptionWorker: any,
|
||||
resourceFetcher: any,
|
||||
syncReport: any,
|
||||
tags: any[],
|
||||
syncStarted: boolean,
|
||||
themeId: number;
|
||||
dispatch: Function;
|
||||
folders: any[];
|
||||
collapsedFolderIds: string[];
|
||||
notesParentType: string;
|
||||
selectedFolderId: string;
|
||||
selectedTagId: string;
|
||||
selectedSmartFilterId: string;
|
||||
decryptionWorker: any;
|
||||
resourceFetcher: any;
|
||||
syncReport: any;
|
||||
tags: any[];
|
||||
syncStarted: boolean;
|
||||
}
|
||||
|
||||
interface State {
|
||||
tagHeaderIsExpanded: boolean,
|
||||
folderHeaderIsExpanded: boolean,
|
||||
tagHeaderIsExpanded: boolean;
|
||||
folderHeaderIsExpanded: boolean;
|
||||
}
|
||||
|
||||
const commands = [
|
||||
|
||||
@@ -11,9 +11,9 @@ const { ReportService } = require('@joplin/lib/services/report.js');
|
||||
const fs = require('fs-extra');
|
||||
|
||||
interface Props {
|
||||
themeId: string,
|
||||
style: any,
|
||||
dispatch: Function,
|
||||
themeId: string;
|
||||
style: any;
|
||||
dispatch: Function;
|
||||
}
|
||||
|
||||
async function exportDebugReportClick() {
|
||||
|
||||
@@ -7,9 +7,9 @@ const { themeStyle } = require('@joplin/lib/theme');
|
||||
const TagItem = require('./TagItem.min.js');
|
||||
|
||||
interface Props {
|
||||
themeId: number,
|
||||
style: any,
|
||||
items: any[],
|
||||
themeId: number;
|
||||
style: any;
|
||||
items: any[];
|
||||
}
|
||||
|
||||
function TagList(props: Props) {
|
||||
|
||||
@@ -8,9 +8,9 @@ export enum Value {
|
||||
}
|
||||
|
||||
export interface Props {
|
||||
themeId: number,
|
||||
value: Value,
|
||||
toolbarButtonInfo: ToolbarButtonInfo,
|
||||
themeId: number;
|
||||
value: Value;
|
||||
toolbarButtonInfo: ToolbarButtonInfo;
|
||||
}
|
||||
|
||||
export default function ToggleEditorsButton(props: Props) {
|
||||
|
||||
@@ -6,9 +6,9 @@ const { themeStyle } = require('@joplin/lib/theme');
|
||||
const ToolbarSpace = require('./ToolbarSpace.min.js');
|
||||
|
||||
interface Props {
|
||||
themeId: number,
|
||||
style: any,
|
||||
items: any[],
|
||||
themeId: number;
|
||||
style: any;
|
||||
items: any[];
|
||||
}
|
||||
|
||||
class ToolbarBaseComponent extends React.Component<Props, any> {
|
||||
|
||||
@@ -3,13 +3,13 @@ import { ToolbarButtonInfo } from '@joplin/lib/services/commands/ToolbarButtonUt
|
||||
import { StyledRoot, StyledIconSpan, StyledIconI } from './styles';
|
||||
|
||||
interface Props {
|
||||
readonly themeId: number,
|
||||
readonly toolbarButtonInfo?: ToolbarButtonInfo,
|
||||
readonly title?: string,
|
||||
readonly tooltip?: string,
|
||||
readonly iconName?: string,
|
||||
readonly disabled?: boolean,
|
||||
readonly backgroundHover?: boolean,
|
||||
readonly themeId: number;
|
||||
readonly toolbarButtonInfo?: ToolbarButtonInfo;
|
||||
readonly title?: string;
|
||||
readonly tooltip?: string;
|
||||
readonly iconName?: string;
|
||||
readonly disabled?: boolean;
|
||||
readonly backgroundHover?: boolean;
|
||||
}
|
||||
|
||||
function isFontAwesomeIcon(iconName: string) {
|
||||
|
||||
@@ -15,10 +15,10 @@ const Note = require('@joplin/lib/models/Note');
|
||||
const { substrWithEllipsis } = require('@joplin/lib/string-utils');
|
||||
|
||||
interface ContextMenuProps {
|
||||
notes: any[],
|
||||
dispatch: Function,
|
||||
watchedNoteFiles: string[],
|
||||
plugins: PluginStates,
|
||||
notes: any[];
|
||||
dispatch: Function;
|
||||
watchedNoteFiles: string[];
|
||||
plugins: PluginStates;
|
||||
}
|
||||
|
||||
export default class NoteListUtils {
|
||||
|
||||
Reference in New Issue
Block a user