refactor: manually write like 3,000 import statements because i must test my willpower
This commit is contained in:
274 files changed
+1222
-1702
No files matched your search
@@ -1,11 +1,11 @@
|
||||
import { profile } from '$lib/app/auth.svelte'
|
||||
import { DEFAULT_INSTANCE_URL } from '$lib/instance.svelte.js'
|
||||
import { instanceToURL } from '$lib/util.svelte'
|
||||
import { DEFAULT_INSTANCE_URL } from '$lib/app/instance.svelte'
|
||||
import { instanceToURL } from '$lib/app/util.svelte'
|
||||
import { error } from '@sveltejs/kit'
|
||||
import { type GetSiteResponse } from '$lib/client/types'
|
||||
import { BaseClient, DEFAULT_CLIENT_TYPE, type ClientType } from './base'
|
||||
import { LemmyClient } from './lemmy/adapter'
|
||||
import { PiefedClient } from './piefed/adapter'
|
||||
import { DEFAULT_CLIENT_TYPE, type ClientType, BaseClient } from './base'
|
||||
import type { GetSiteResponse } from './types'
|
||||
|
||||
class SiteData {
|
||||
#data = $state<GetSiteResponse>()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { LemmyHttp } from 'lemmy-js-client'
|
||||
import type { BaseClient, ClientType } from '../base'
|
||||
import { fromGetPosts, toListingType } from './rewrite'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as lemmy from 'lemmy-js-client'
|
||||
import type { GetPosts, ListingType } from '../types'
|
||||
import * as lemmy from '../types'
|
||||
|
||||
export function fromGetPosts(getPosts: GetPosts): lemmy.GetPosts {
|
||||
return {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import createClient from 'openapi-fetch'
|
||||
import type {
|
||||
import {
|
||||
BaseClient,
|
||||
ClientType,
|
||||
NullableFnArg,
|
||||
NullableFnReturn,
|
||||
type ClientType,
|
||||
type NullableFnArg,
|
||||
type NullableFnReturn,
|
||||
} from '../base'
|
||||
import type { SubscribedType } from '../types'
|
||||
import {
|
||||
fromCreateComment,
|
||||
fromCreatePost,
|
||||
@@ -33,7 +34,6 @@ import {
|
||||
toTopicView,
|
||||
} from './rewrite'
|
||||
import type { paths } from './schema'
|
||||
import type { SubscribedType } from '../types'
|
||||
|
||||
export class PiefedClient implements BaseClient {
|
||||
type: ClientType = { name: 'piefed', baseUrl: '/api/alpha' }
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Post } from '$lib/feature/post'
|
||||
import { Search } from 'mono-svelte'
|
||||
import type {
|
||||
Comment,
|
||||
CommentReplyView,
|
||||
CommentSortType,
|
||||
CommentView,
|
||||
@@ -18,10 +19,8 @@ import type {
|
||||
Person,
|
||||
PersonMentionView,
|
||||
PersonView,
|
||||
Post,
|
||||
PostView,
|
||||
PrivateMessageView,
|
||||
Search,
|
||||
SortType,
|
||||
SubscribedType,
|
||||
TopicView,
|
||||
|
||||
Reference in new issue
Block a user