Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-05-13 19:00:42 +02:00
parent a58c52631e
commit cb3a900d39
639 changed files with 1185 additions and 887 deletions

View File

@ -8,8 +8,8 @@ import trimStart from 'lodash/trimStart';
import { type MRFSimple, mrfSimpleSchema } from 'soapbox/schemas/pleroma';
export type Config = ImmutableMap<string, any>;
export type Policy = Record<string, any>;
type Config = ImmutableMap<string, any>;
type Policy = Record<string, any>;
const find = (
configs: ImmutableList<Config>,
@ -57,7 +57,4 @@ const ConfigDB = {
fromSimplePolicy,
};
export {
ConfigDB,
ConfigDB as default,
};
export { type Config, type Policy, ConfigDB as default };

View File

@ -28,4 +28,4 @@ const copy = (text: string, onSuccess?: () => void) => {
}
};
export default copy;
export { copy as default };

View File

@ -96,4 +96,4 @@ const createFaviconService = () => {
const FaviconService = createFaviconService();
export default FaviconService;
export { FaviconService as default };

View File

@ -867,7 +867,7 @@ const getInstanceFeatures = (instance: Instance) => {
};
/** Features available from a backend */
export type Features = ReturnType<typeof getInstanceFeatures>;
type Features = ReturnType<typeof getInstanceFeatures>;
/** Detect backend features to conditionally render elements */
const getFeatures = createSelector([
@ -932,6 +932,7 @@ export {
GLITCH,
REBASED,
UNRELEASED,
type Features,
getFeatures,
parseVersion,
};

View File

@ -11,7 +11,7 @@ const makeEmojiMap = (emojis: any) => emojis.reduce((obj: any, emoji: any) => {
/** Normalize entity ID */
const normalizeId = (id: any): string | null => z.string().nullable().catch(null).parse(id);
export type Normalizer<V, R> = (value: V) => R;
type Normalizer<V, R> = (value: V) => R;
/**
* Allows using any legacy normalizer function as a zod schema.
@ -34,6 +34,7 @@ const maybeFromJS = (value: any): unknown => {
};
export {
type Normalizer,
mergeDefined,
makeEmojiMap,
normalizeId,

View File

@ -2,7 +2,7 @@ import { queryClient } from 'soapbox/queries/client';
import type { InfiniteData, QueryKey } from '@tanstack/react-query';
export interface PaginatedResult<T> {
interface PaginatedResult<T> {
result: T[];
hasMore: boolean;
link?: string;
@ -105,6 +105,7 @@ const sortQueryData = <T>(queryKey: QueryKey, comparator: (a: T, b: T) => number
};
export {
type PaginatedResult,
flattenPages,
updatePageItem,
appendPageItem,