summaryrefslogtreecommitdiff
path: root/packages/frontend/src/widgets/widget.ts
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2026-01-09 22:06:40 +0900
committerGitHub <noreply@github.com>2026-01-09 22:06:40 +0900
commit41592eafb363e3c62ab2d3e5f41b38d7d083d3fb (patch)
tree8f69243a5482ad4161eb28b69769684a221aa05c /packages/frontend/src/widgets/widget.ts
parentfix(frontend): popupのemit型が正しく利用できるように修正 (#16... (diff)
downloadmisskey-41592eafb363e3c62ab2d3e5f41b38d7d083d3fb.tar.gz
misskey-41592eafb363e3c62ab2d3e5f41b38d7d083d3fb.tar.bz2
misskey-41592eafb363e3c62ab2d3e5f41b38d7d083d3fb.zip
refactor: make noImplicitAny true (#17083)
* wip * Update emojis.emoji.vue * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update manager.ts * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update analytics.ts
Diffstat (limited to 'packages/frontend/src/widgets/widget.ts')
-rw-r--r--packages/frontend/src/widgets/widget.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/frontend/src/widgets/widget.ts b/packages/frontend/src/widgets/widget.ts
index 603cf8a31d..cab6177247 100644
--- a/packages/frontend/src/widgets/widget.ts
+++ b/packages/frontend/src/widgets/widget.ts
@@ -5,12 +5,11 @@
import { defineAsyncComponent, reactive, watch } from 'vue';
import { throttle } from 'throttle-debounce';
-import { getDefaultFormValues } from '@/utility/form.js';
import type { Reactive } from 'vue';
import type { FormWithDefault, GetFormResultType } from '@/utility/form.js';
+import { getDefaultFormValues } from '@/utility/form.js';
import * as os from '@/os.js';
import { deepClone } from '@/utility/clone.js';
-import { i18n } from '@/i18n';
export type Widget<P extends Record<string, unknown>> = {
id: string;
@@ -22,7 +21,7 @@ export type WidgetComponentProps<P extends Record<string, unknown>> = {
};
export type WidgetComponentEmits<P extends Record<string, unknown>> = {
- (ev: 'updateProps', props: P);
+ (ev: 'updateProps', props: P): void;
};
export type WidgetComponentExpose = {
@@ -54,7 +53,7 @@ export const useWidgetPropsManager = <F extends FormWithDefault>(
watch(() => props.widget?.data, (to) => {
if (to != null) {
for (const key of Object.keys(propsDef)) {
- widgetProps[key] = to[key];
+ (widgetProps as any)[key] = to[key];
}
}
}, { deep: true });
@@ -66,7 +65,7 @@ export const useWidgetPropsManager = <F extends FormWithDefault>(
const configure = async () => {
const form = deepClone(propsDef);
for (const item of Object.keys(form)) {
- form[item].default = widgetProps[item];
+ form[item].default = (widgetProps as any)[item];
}
const res = await new Promise<{
@@ -97,7 +96,7 @@ export const useWidgetPropsManager = <F extends FormWithDefault>(
}
for (const key of Object.keys(res.result)) {
- widgetProps[key] = res.result[key];
+ (widgetProps as any)[key] = res.result[key];
}
save();