1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-20 05:55:29 +02:00

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
This commit is contained in:
syuilo
2026-01-09 22:06:40 +09:00
committed by GitHub
parent 2a14025c29
commit 41592eafb3
233 changed files with 966 additions and 963 deletions

View File

@@ -46,6 +46,6 @@ const parsed = computed(() => {
});
const render = () => {
return h(props.tag, parsed.value.map(x => typeof x === 'string' ? (props.textTag ? h(props.textTag, x) : x) : slots[x.arg]()));
return h(props.tag, parsed.value.map(x => typeof x === 'string' ? (props.textTag ? h(props.textTag, x) : x) : (slots as any)[x.arg]()));
};
</script>

View File

@@ -48,7 +48,7 @@ const active = computed(() => {
return resolved.route.name === router.currentRoute.value.name;
});
function onContextmenu(ev) {
function onContextmenu(ev: PointerEvent) {
const selection = window.getSelection();
if (selection && selection.toString() !== '') return;
os.contextMenu([{
@@ -85,7 +85,7 @@ function openWindow() {
os.pageWindow(props.to);
}
function nav(ev: MouseEvent) {
function nav(ev: PointerEvent) {
// 制御キーとの組み合わせは無視shiftを除く
if (ev.metaKey || ev.altKey || ev.ctrlKey) return;

View File

@@ -77,7 +77,7 @@ const props = withDefaults(defineProps<{
});
const emit = defineEmits<{
(ev: 'click', v: MouseEvent): void;
(ev: 'click', v: PointerEvent): void;
}>();
const showDecoration = props.forceShowDecoration || prefer.s.showAvatarDecorations;
@@ -91,7 +91,7 @@ const url = computed(() => {
return props.user.avatarUrl;
});
function onClick(ev: MouseEvent): void {
function onClick(ev: PointerEvent): void {
if (props.link) return;
emit('click', ev);
}

View File

@@ -23,8 +23,8 @@ const observer = new ResizeObserver((entries) => {
transform: string;
}[] = [];
for (const entry of entries) {
const content = (entry.target[contentSymbol] ? entry.target : entry.target.firstElementChild) as HTMLSpanElement;
const props: Required<Props> = content[contentSymbol];
const content = ((entry.target as any)[contentSymbol] ? entry.target : entry.target.firstElementChild) as HTMLSpanElement;
const props: Required<Props> = (content as any)[contentSymbol];
const container = content.parentElement as HTMLSpanElement;
const contentWidth = content.getBoundingClientRect().width;
const containerWidth = container.getBoundingClientRect().width;
@@ -46,15 +46,15 @@ const props = withDefaults(defineProps<Props>(), {
const content = ref<HTMLSpanElement>();
watch(content, (value, oldValue) => {
if (oldValue) {
delete oldValue[contentSymbol];
if (oldValue != null) {
delete (oldValue as any)[contentSymbol];
observer.unobserve(oldValue);
if (oldValue.parentElement) {
observer.unobserve(oldValue.parentElement);
}
}
if (value) {
value[contentSymbol] = props;
if (value != null) {
(value as any)[contentSymbol] = props;
observer.observe(value);
if (value.parentElement) {
observer.observe(value.parentElement);

View File

@@ -102,7 +102,7 @@ const url = computed(() => {
const alt = computed(() => `:${customEmojiName.value}:`);
const errored = ref(url.value == null);
function onClick(ev: MouseEvent) {
function onClick(ev: PointerEvent) {
if (props.menu) {
const menuItems: MenuItem[] = [];

View File

@@ -67,7 +67,7 @@ function unmute() {
});
}
function onClick(ev: MouseEvent) {
function onClick(ev: PointerEvent) {
if (props.menu) {
const menuItems: MenuItem[] = [];

View File

@@ -319,7 +319,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
]);
}
case 'clickable': {
return h('span', { onClick(ev: MouseEvent): void {
return h('span', { onClick(ev: PointerEvent): void {
ev.stopPropagation();
ev.preventDefault();
const clickEv = typeof token.props.args.ev === 'string' ? token.props.args.ev : '';

View File

@@ -46,7 +46,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts">
export type Tab = {
key: string;
onClick?: (ev: MouseEvent) => void;
onClick?: (ev: PointerEvent) => void;
iconOnly?: boolean;
title: string;
icon?: string;
@@ -70,8 +70,8 @@ const props = withDefaults(defineProps<{
});
const emit = defineEmits<{
(ev: 'update:tab', key: string);
(ev: 'tabClick', key: string);
(ev: 'update:tab', key: string): void;
(ev: 'tabClick', key: string): void;
}>();
const el = useTemplateRef('el');
@@ -96,7 +96,7 @@ function onTabMousedown(tab: Tab, ev: MouseEvent): void {
}
}
function onTabClick(t: Tab, ev: MouseEvent): void {
function onTabClick(t: Tab, ev: PointerEvent): void {
emit('tabClick', t.key);
if (t.onClick) {

View File

@@ -61,7 +61,6 @@ export type PageHeaderProps = {
import { onMounted, onUnmounted, ref, inject, useTemplateRef, computed } from 'vue';
import { scrollToTop } from '@@/js/scroll.js';
import XTabs from './MkPageHeader.tabs.vue';
import { globalEvents } from '@/events.js';
import { getAccountMenu } from '@/accounts.js';
import { $i } from '@/i.js';
import { DI } from '@/di.js';
@@ -72,7 +71,7 @@ const props = withDefaults(defineProps<PageHeaderProps>(), {
});
const emit = defineEmits<{
(ev: 'update:tab', key: string);
(ev: 'update:tab', key: string): void;
}>();
//const viewId = inject(DI.viewId);
@@ -100,7 +99,7 @@ const top = () => {
}
};
async function openAccountMenu(ev: MouseEvent) {
async function openAccountMenu(ev: PointerEvent) {
const menuItems = await getAccountMenu({
withExtraOperation: true,
});

View File

@@ -32,7 +32,7 @@ function _closeTip() {
closeTip(props.k);
}
function showMenu(ev: MouseEvent) {
function showMenu(ev: PointerEvent) {
os.popupMenu([{
icon: 'ti ti-bulb-off',
text: i18n.ts.hideAllTips,