chore(knip): trim dead exports and tool noise

This commit is contained in:
plebeius
2026-03-08 16:37:34 +08:00
parent b2137c7f91
commit 90a01057f2
30 changed files with 106 additions and 383 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
import type { DirectoryCommunity } from './use-directories';
import { computeGuiPostsPerPage, getBoardFeedPageSizeConstants, type CommunityWithPostsPerPage } from '../lib/utils/board-feed-pagination';
export type BoardFeedPageSize = ReturnType<typeof getBoardFeedPageSizeConstants>;
type BoardFeedPageSize = ReturnType<typeof getBoardFeedPageSizeConstants>;
/**
* Compute board feed page-size values from directory community.
+2 -2
View File
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useState } from 'react';
import directoriesData from '../data/5chan-directories.json';
export interface DirectoriesMetadata {
interface DirectoriesMetadata {
title: string;
description: string;
createdAt: number;
@@ -36,7 +36,7 @@ export interface DirectoriesData {
communities: DirectoryCommunity[];
}
export interface DirectoriesState {
interface DirectoriesState {
communities: DirectoryCommunity[];
loading: boolean;
error: Error | null;
+2 -2
View File
@@ -19,7 +19,7 @@ const setCachedGifFrame = async (url: string, frameUrl: string): Promise<void> =
await gifFrameDb.setItem(url, frameUrl);
};
export const fetchImage = (url: string): Promise<ArrayBuffer> => {
const fetchImage = (url: string): Promise<ArrayBuffer> => {
return new Promise((resolve, reject) => {
const request = new XMLHttpRequest();
request.open('GET', url, true);
@@ -35,7 +35,7 @@ export const fetchImage = (url: string): Promise<ArrayBuffer> => {
});
};
export const readImage = (file: File): Promise<ArrayBuffer> => {
const readImage = (file: File): Promise<ArrayBuffer> => {
return new Promise((resolve) => {
const reader = new FileReader();
reader.onload = () => {
+1 -1
View File
@@ -92,7 +92,7 @@ function getRuntime(): 'web' | 'electron' | 'android' {
return 'web';
}
export interface UseFileUploadOptions {
interface UseFileUploadOptions {
onUploadComplete: (url: string, fileName: string) => void;
}
+1 -1
View File
@@ -5,7 +5,7 @@ import { useDirectoryByAddress } from './use-directories';
import { useBoardFeedPageSize } from './use-board-feed-page-size';
import { findPostPageInFeed, findPostPageInLoadedBoardFeeds, type FeedsOptionsLike, type LoadedFeedsLike } from '../lib/utils/post-page-resolution';
export interface UsePostPageNumberOptions {
interface UsePostPageNumberOptions {
subplebbitAddress: string | undefined;
postCid: string | undefined;
/** When false, page segment is excluded (e.g. pending-post view). When true, resolve and show page. */
+1 -1
View File
@@ -2,7 +2,7 @@ import { useEffect } from 'react';
import { useSubplebbitStats } from '@bitsocialhq/bitsocial-react-hooks';
import { create } from 'zustand';
export type SubplebbitsStatsState = {
type SubplebbitsStatsState = {
subplebbitsStats: { [subplebbitAddress: string]: any };
setSubplebbitStats: (subplebbitAddress: string, stats: any) => void;
};