1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-21 04:05:28 +02:00

refactor(frontend): フロントエンドの型エラー解消(途中まで) (#16539)

* fix(frontend): FormLinkをボタンとして使用した際にエラーが出る問題を修正

* refactor(frontend): フロントエンドの型エラー解消

* remove unused ts-expect-error

* migrate

* remove unrelated changes

* fix lint

* more type fixes
This commit is contained in:
かっこかり
2025-09-13 08:33:14 +09:00
committed by GitHub
parent c174c5c144
commit 5b4115e21a
56 changed files with 316 additions and 236 deletions

View File

@@ -26,10 +26,10 @@ const chartEl = useTemplateRef('chartEl');
const { handler: externalTooltipHandler } = useChartTooltip();
let chartInstance: Chart;
let chartInstance: Chart | null = null;
function setData(values) {
if (chartInstance == null) return;
function setData(values: number[]) {
if (chartInstance == null || chartInstance.data.labels == null) return;
for (const value of values) {
chartInstance.data.labels.push('');
chartInstance.data.datasets[0].data.push(value);
@@ -41,8 +41,8 @@ function setData(values) {
chartInstance.update();
}
function pushData(value) {
if (chartInstance == null) return;
function pushData(value: number) {
if (chartInstance == null || chartInstance.data.labels == null) return;
chartInstance.data.labels.push('');
chartInstance.data.datasets[0].data.push(value);
if (chartInstance.data.datasets[0].data.length > 100) {
@@ -67,6 +67,8 @@ const color =
'?' as never;
onMounted(() => {
if (chartEl.value == null) return;
const vLineColor = store.s.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
chartInstance = new Chart(chartEl.value, {