refactor(frontend): add explicit `Promise<void>` return types in `os.ts` (#10156)
This commit is contained in:
parent
fdf7605074
commit
896400a6c9
|
@ -362,7 +362,7 @@ export function select<C = any>(props: {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function success() {
|
export function success(): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const showing = ref(true);
|
const showing = ref(true);
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
|
@ -377,7 +377,7 @@ export function success() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function waiting() {
|
export function waiting(): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const showing = ref(true);
|
const showing = ref(true);
|
||||||
popup(MkWaitingDialog, {
|
popup(MkWaitingDialog, {
|
||||||
|
@ -528,7 +528,7 @@ export function popupMenu(items: MenuItem[] | Ref<MenuItem[]>, src?: HTMLElement
|
||||||
width?: number;
|
width?: number;
|
||||||
viaKeyboard?: boolean;
|
viaKeyboard?: boolean;
|
||||||
onClosing?: () => void;
|
onClosing?: () => void;
|
||||||
}) {
|
}): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let dispose;
|
let dispose;
|
||||||
popup(MkPopupMenu, {
|
popup(MkPopupMenu, {
|
||||||
|
@ -551,7 +551,7 @@ export function popupMenu(items: MenuItem[] | Ref<MenuItem[]>, src?: HTMLElement
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function contextMenu(items: MenuItem[] | Ref<MenuItem[]>, ev: MouseEvent) {
|
export function contextMenu(items: MenuItem[] | Ref<MenuItem[]>, ev: MouseEvent): Promise<void> {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let dispose;
|
let dispose;
|
||||||
|
@ -569,7 +569,7 @@ export function contextMenu(items: MenuItem[] | Ref<MenuItem[]>, ev: MouseEvent)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function post(props: Record<string, any> = {}) {
|
export function post(props: Record<string, any> = {}): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// NOTE: MkPostFormDialogをdynamic importするとiOSでテキストエリアに自動フォーカスできない
|
// NOTE: MkPostFormDialogをdynamic importするとiOSでテキストエリアに自動フォーカスできない
|
||||||
// NOTE: ただ、dynamic importしない場合、MkPostFormDialogインスタンスが使いまわされ、
|
// NOTE: ただ、dynamic importしない場合、MkPostFormDialogインスタンスが使いまわされ、
|
||||||
|
|
Loading…
Reference in New Issue