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

@@ -53,19 +53,27 @@ const pointsReply = ref<string>();
const pointsRenote = ref<string>();
const pointsTotal = ref<string>();
function dragListen(fn) {
function dragListen(fn: (ev: MouseEvent | TouchEvent) => void) {
window.addEventListener('mousemove', fn);
window.addEventListener('mouseleave', dragClear.bind(null, fn));
window.addEventListener('mouseup', dragClear.bind(null, fn));
}
function dragClear(fn) {
function dragClear(fn: (ev: MouseEvent | TouchEvent) => void) {
window.removeEventListener('mousemove', fn);
window.removeEventListener('mouseleave', dragClear);
window.removeEventListener('mouseup', dragClear);
window.removeEventListener('mouseleave', dragClear as any);
window.removeEventListener('mouseup', dragClear as any);
}
function onMousedown(ev) {
function getPositionX(event: MouseEvent | TouchEvent) {
return 'touches' in event && event.touches.length > 0 ? event.touches[0].clientX : 'clientX' in event ? event.clientX : 0;
}
function getPositionY(event: MouseEvent | TouchEvent) {
return 'touches' in event && event.touches.length > 0 ? event.touches[0].clientY : 'clientY' in event ? event.clientY : 0;
}
function onMousedown(ev: MouseEvent) {
const clickX = ev.clientX;
const clickY = ev.clientY;
const baseZoom = zoom.value;
@@ -73,8 +81,11 @@ function onMousedown(ev) {
// 動かした時
dragListen(me => {
let moveLeft = me.clientX - clickX;
let moveTop = me.clientY - clickY;
const x = getPositionX(me);
const y = getPositionY(me);
let moveLeft = x - clickX;
let moveTop = y - clickY;
zoom.value = Math.max(1, baseZoom + (-moveTop / 20));
pos.value = Math.min(0, basePos + moveLeft);