summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/aiscript/api.ts2
-rw-r--r--packages/frontend/src/scripts/file-drop.ts2
-rw-r--r--packages/frontend/src/scripts/format-time-string.ts2
-rw-r--r--packages/frontend/src/scripts/key-event.ts14
-rw-r--r--packages/frontend/src/scripts/stream-mock.ts6
5 files changed, 13 insertions, 13 deletions
diff --git a/packages/frontend/src/scripts/aiscript/api.ts b/packages/frontend/src/scripts/aiscript/api.ts
index e203c51bba..2c0c8c816e 100644
--- a/packages/frontend/src/scripts/aiscript/api.ts
+++ b/packages/frontend/src/scripts/aiscript/api.ts
@@ -76,7 +76,7 @@ export function createAiScriptEnv(opts: { storageKey: string, token?: string })
// バグがあればundefinedもあり得るため念のため
if (typeof token.value !== 'string') throw new Error('invalid token');
}
- const actualToken: string|null = token?.value ?? opts.token ?? null;
+ const actualToken: string | null = token?.value ?? opts.token ?? null;
if (param == null) {
throw new errors.AiScriptRuntimeError('expected param');
}
diff --git a/packages/frontend/src/scripts/file-drop.ts b/packages/frontend/src/scripts/file-drop.ts
index c2e863c0dc..4259fe25e9 100644
--- a/packages/frontend/src/scripts/file-drop.ts
+++ b/packages/frontend/src/scripts/file-drop.ts
@@ -15,7 +15,7 @@ export type DroppedDirectory = {
isFile: false;
path: string;
children: DroppedItem[];
-}
+};
export async function extractDroppedItems(ev: DragEvent): Promise<DroppedItem[]> {
const dropItems = ev.dataTransfer?.items;
diff --git a/packages/frontend/src/scripts/format-time-string.ts b/packages/frontend/src/scripts/format-time-string.ts
index 35ad77d982..d383f143e1 100644
--- a/packages/frontend/src/scripts/format-time-string.ts
+++ b/packages/frontend/src/scripts/format-time-string.ts
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-const defaultLocaleStringFormats: {[index: string]: string} = {
+const defaultLocaleStringFormats: { [index: string]: string } = {
'weekday': 'narrow',
'era': 'narrow',
'year': 'numeric',
diff --git a/packages/frontend/src/scripts/key-event.ts b/packages/frontend/src/scripts/key-event.ts
index a72776d48c..020a6c2174 100644
--- a/packages/frontend/src/scripts/key-event.ts
+++ b/packages/frontend/src/scripts/key-event.ts
@@ -7,7 +7,7 @@
* {@link KeyboardEvent.code} の値を表す文字列。不足分は適宜追加する
* @see https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values
*/
-export type KeyCode =
+export type KeyCode = (
| 'Backspace'
| 'Tab'
| 'Enter'
@@ -94,32 +94,32 @@ export type KeyCode =
| 'Quote'
| 'Meta'
| 'AltGraph'
- ;
+);
/**
* 修飾キーを表す文字列。不足分は適宜追加する。
*/
-export type KeyModifier =
+export type KeyModifier = (
| 'Shift'
| 'Control'
| 'Alt'
| 'Meta'
- ;
+);
/**
* 押下されたキー以外の状態を表す文字列。不足分は適宜追加する。
*/
-export type KeyState =
+export type KeyState = (
| 'composing'
| 'repeat'
- ;
+);
export type KeyEventHandler = {
modifiers?: KeyModifier[];
states?: KeyState[];
code: KeyCode | 'any';
handler: (event: KeyboardEvent) => void;
-}
+};
export function handleKeyEvent(event: KeyboardEvent, handlers: KeyEventHandler[]) {
function checkModifier(ev: KeyboardEvent, modifiers? : KeyModifier[]) {
diff --git a/packages/frontend/src/scripts/stream-mock.ts b/packages/frontend/src/scripts/stream-mock.ts
index cb0e607fcb..9b1b368de4 100644
--- a/packages/frontend/src/scripts/stream-mock.ts
+++ b/packages/frontend/src/scripts/stream-mock.ts
@@ -37,9 +37,9 @@ export class StreamMock extends EventEmitter<StreamEvents> implements IStream {
// do nothing
}
- public send(typeOrPayload: string): void
- public send(typeOrPayload: string, payload: any): void
- public send(typeOrPayload: Record<string, any> | any[]): void
+ public send(typeOrPayload: string): void;
+ public send(typeOrPayload: string, payload: any): void;
+ public send(typeOrPayload: Record<string, any> | any[]): void;
public send(typeOrPayload: string | Record<string, any> | any[], payload?: any): void {
// do nothing
}