Drop accidental eslint dependency (#11460)
This commit is contained in:
Vendored
+1
-3
@@ -25,9 +25,7 @@ export interface PostShadow {
|
||||
repostUri: AtUriString | 'pending' | undefined
|
||||
isDeleted: boolean
|
||||
embed:
|
||||
| app.bsky.embed.record.View
|
||||
| app.bsky.embed.recordWithMedia.View
|
||||
| undefined
|
||||
app.bsky.embed.record.View | app.bsky.embed.recordWithMedia.View | undefined
|
||||
pinned: boolean
|
||||
optimisticReplyCount: number | undefined
|
||||
bookmarked: boolean | undefined
|
||||
|
||||
Vendored
+1
-2
@@ -47,8 +47,7 @@ export interface ProfileShadow {
|
||||
verification: app.bsky.actor.defs.VerificationState
|
||||
status: app.bsky.actor.defs.StatusView | undefined
|
||||
activitySubscription:
|
||||
| app.bsky.notification.defs.ActivitySubscription
|
||||
| undefined
|
||||
app.bsky.notification.defs.ActivitySubscription | undefined
|
||||
}
|
||||
|
||||
const shadows: WeakMap<
|
||||
|
||||
@@ -52,8 +52,7 @@ type ComposerImageWithTransformation = ComposerImageBase & {
|
||||
}
|
||||
|
||||
export type ComposerImage =
|
||||
| ComposerImageWithoutTransformation
|
||||
| ComposerImageWithTransformation
|
||||
ComposerImageWithoutTransformation | ComposerImageWithTransformation
|
||||
|
||||
let _imageCacheDirectory: string
|
||||
|
||||
|
||||
@@ -709,8 +709,7 @@ export class Convo {
|
||||
}
|
||||
|
||||
private pendingFetchConvo:
|
||||
| Promise<{convo: chat.bsky.convo.defs.ConvoView}>
|
||||
| undefined
|
||||
Promise<{convo: chat.bsky.convo.defs.ConvoView}> | undefined
|
||||
async fetchConvo() {
|
||||
if (this.pendingFetchConvo) return this.pendingFetchConvo
|
||||
|
||||
|
||||
@@ -153,8 +153,7 @@ export function ConvoProvider({
|
||||
const queryKey = event.query.queryKey as string[]
|
||||
if (queryKey[0] === root && queryKey[1] === id) {
|
||||
const data = event.query.state.data as
|
||||
| chat.bsky.convo.defs.ConvoView
|
||||
| undefined
|
||||
chat.bsky.convo.defs.ConvoView | undefined
|
||||
if (data && convo.convo && data.muted !== convo.convo.view.muted) {
|
||||
convo.updateMuted(data.muted)
|
||||
}
|
||||
|
||||
@@ -142,8 +142,7 @@ export function invalidateJoinLinkPreviewsForConvo(
|
||||
const [root] = query.queryKey
|
||||
if (root !== joinLinkPreviewQueryKeyRoot) return false
|
||||
const data = query.state.data as
|
||||
| chat.bsky.group.getJoinLinkPreviews.$OutputBody
|
||||
| undefined
|
||||
chat.bsky.group.getJoinLinkPreviews.$OutputBody | undefined
|
||||
return (
|
||||
data?.joinLinkPreviews.some(
|
||||
preview =>
|
||||
|
||||
@@ -38,10 +38,7 @@ export const RQKEY = (
|
||||
readState: 'all' | 'unread' = 'all',
|
||||
kind: 'all' | 'group' | 'direct' = 'all',
|
||||
lockStatus:
|
||||
| 'unlocked'
|
||||
| 'locked'
|
||||
| 'locked-permanently'
|
||||
| undefined = undefined,
|
||||
'unlocked' | 'locked' | 'locked-permanently' | undefined = undefined,
|
||||
limit?: number,
|
||||
) => [RQKEY_ROOT, status, readState, kind, lockStatus, limit] as const
|
||||
|
||||
@@ -255,9 +252,9 @@ export function ListConvosProviderInner({
|
||||
// memberCount bump to avoid double-counting.
|
||||
const alreadyKnownMember =
|
||||
queryClient
|
||||
.getQueryData<
|
||||
chat.bsky.actor.defs.ProfileViewBasic[]
|
||||
>(listConvoMembersQueryKey(convoId))
|
||||
.getQueryData<chat.bsky.actor.defs.ProfileViewBasic[]>(
|
||||
listConvoMembersQueryKey(convoId),
|
||||
)
|
||||
?.some(m => m.did === did) ?? false
|
||||
mutateMembers(convoId, list =>
|
||||
list.some(m => m.did === did) ? list : list.concat(newMember),
|
||||
@@ -279,9 +276,9 @@ export function ListConvosProviderInner({
|
||||
// list, skip the memberCount decrement to avoid double-counting.
|
||||
const alreadyRemovedMember =
|
||||
queryClient
|
||||
.getQueryData<
|
||||
chat.bsky.actor.defs.ProfileViewBasic[]
|
||||
>(listConvoMembersQueryKey(convoId))
|
||||
.getQueryData<chat.bsky.actor.defs.ProfileViewBasic[]>(
|
||||
listConvoMembersQueryKey(convoId),
|
||||
)
|
||||
?.some(m => m.did === did) === false
|
||||
mutateMembers(convoId, list => list.filter(m => m.did !== did))
|
||||
mutateConvoView(
|
||||
|
||||
@@ -6,10 +6,7 @@ import {useAppviewClient, useSession} from '#/state/session'
|
||||
import {app} from '#/lexicons'
|
||||
|
||||
export type MyListsFilter =
|
||||
| 'all'
|
||||
| 'curate'
|
||||
| 'mod'
|
||||
| 'all-including-subscribed'
|
||||
'all' | 'curate' | 'mod' | 'all-including-subscribed'
|
||||
|
||||
const RQKEY_ROOT = 'my-lists'
|
||||
export const RQKEY = (filter: MyListsFilter) => [RQKEY_ROOT, filter]
|
||||
|
||||
@@ -3,8 +3,7 @@ import {type app} from '#/lexicons'
|
||||
export type Notification = app.bsky.notification.listNotifications.Notification
|
||||
|
||||
export type NotificationType =
|
||||
| StarterPackNotificationType
|
||||
| OtherNotificationType
|
||||
StarterPackNotificationType | OtherNotificationType
|
||||
|
||||
export type FeedNotification =
|
||||
| (FeedNotificationBase & {
|
||||
@@ -56,6 +55,5 @@ type FeedNotificationBase = {
|
||||
additional?: Notification[]
|
||||
subjectUri?: string
|
||||
subject?:
|
||||
| app.bsky.feed.defs.PostView
|
||||
| app.bsky.graph.defs.StarterPackViewBasic
|
||||
app.bsky.feed.defs.PostView | app.bsky.graph.defs.StarterPackViewBasic
|
||||
}
|
||||
|
||||
@@ -89,9 +89,7 @@ export function createMaybeDetachedQuoteEmbed({
|
||||
quoteUri: AtUriString
|
||||
detached: true
|
||||
}):
|
||||
| app.bsky.embed.record.View
|
||||
| app.bsky.embed.recordWithMedia.View
|
||||
| undefined {
|
||||
app.bsky.embed.record.View | app.bsky.embed.recordWithMedia.View | undefined {
|
||||
if (bsky.isType(app.bsky.embed.record.view, post.embed)) {
|
||||
if (detached) {
|
||||
return createEmbedViewDetachedRecord({uri: quoteUri})
|
||||
|
||||
@@ -16,11 +16,6 @@ export type UsePreferencesQueryResponse = Omit<
|
||||
|
||||
export type ThreadViewPreferences = {
|
||||
sort:
|
||||
| 'hotness'
|
||||
| 'oldest'
|
||||
| 'newest'
|
||||
| 'most-likes'
|
||||
| 'random'
|
||||
| (string & {})
|
||||
'hotness' | 'oldest' | 'newest' | 'most-likes' | 'random' | (string & {})
|
||||
lab_treeViewEnabled?: boolean
|
||||
}
|
||||
|
||||
@@ -206,12 +206,13 @@ function mergeList(a?: string[], b?: string[]): string[] | undefined {
|
||||
* than re-validated here. `q`, `limit`, `cursor` and `sort` are the caller's.
|
||||
*/
|
||||
type SearchPostsV2FilterParams = {
|
||||
[K in Exclude<
|
||||
keyof app.bsky.feed.searchPostsV2.$Params,
|
||||
'query' | 'limit' | 'cursor' | 'sort'
|
||||
>]?: app.bsky.feed.searchPostsV2.$Params[K] extends
|
||||
| readonly (infer _E)[]
|
||||
| undefined
|
||||
[
|
||||
K in Exclude<
|
||||
keyof app.bsky.feed.searchPostsV2.$Params,
|
||||
'query' | 'limit' | 'cursor' | 'sort'
|
||||
>
|
||||
]?: app.bsky.feed.searchPostsV2.$Params[K] extends
|
||||
readonly (infer _E)[] | undefined
|
||||
? string[]
|
||||
: app.bsky.feed.searchPostsV2.$Params[K] extends string | undefined
|
||||
? string
|
||||
|
||||
@@ -167,8 +167,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
sessionEvent === 'update' &&
|
||||
sessionData &&
|
||||
(store.getState().currentBundleState.bundle as unknown as
|
||||
| SessionBundle
|
||||
| PublicSessionBundle) === bundle
|
||||
SessionBundle | PublicSessionBundle) === bundle
|
||||
) {
|
||||
failedExpiryTokensRef.current.get(accountDid)?.clear()
|
||||
}
|
||||
@@ -200,8 +199,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
if (sessionEvent === 'expired') {
|
||||
const current = store.getState()
|
||||
const currentBundle = current.currentBundleState.bundle as unknown as
|
||||
| SessionBundle
|
||||
| PublicSessionBundle
|
||||
SessionBundle | PublicSessionBundle
|
||||
const dyingRefreshJwt = sessionData?.refreshJwt
|
||||
// Stale bundle events are handled by the reducer's identity guard.
|
||||
if (
|
||||
@@ -509,8 +507,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
SessionApiContext['refreshSession']
|
||||
>(async () => {
|
||||
const bundle = store.getState().currentBundleState.bundle as unknown as
|
||||
| SessionBundle
|
||||
| PublicSessionBundle
|
||||
SessionBundle | PublicSessionBundle
|
||||
if (!bundle.session) return undefined // logged out: nothing to refresh
|
||||
const before = bundle.session.session
|
||||
const after = await bundle.session.refresh()
|
||||
@@ -595,8 +592,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
* the leader already refreshed, then dispose the previous bundle.
|
||||
*/
|
||||
const prevBundle = state.currentBundleState.bundle as unknown as
|
||||
| SessionBundle
|
||||
| PublicSessionBundle
|
||||
SessionBundle | PublicSessionBundle
|
||||
// Avoid replacing the live bundle for an unrelated account update.
|
||||
const live =
|
||||
prevBundle.session && !prevBundle.session.destroyed
|
||||
@@ -685,8 +681,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
)
|
||||
|
||||
const bundle = state.currentBundleState.bundle as unknown as
|
||||
| SessionBundle
|
||||
| PublicSessionBundle
|
||||
SessionBundle | PublicSessionBundle
|
||||
|
||||
// @ts-expect-error window type is not declared, debug only
|
||||
// eslint-disable-next-line react-hooks/immutability
|
||||
|
||||
@@ -139,21 +139,13 @@ type Log =
|
||||
| {
|
||||
type: 'method:start'
|
||||
method:
|
||||
| 'createAccount'
|
||||
| 'login'
|
||||
| 'logout'
|
||||
| 'resumeSession'
|
||||
| 'removeAccount'
|
||||
'createAccount' | 'login' | 'logout' | 'resumeSession' | 'removeAccount'
|
||||
account?: RedactedAccount
|
||||
}
|
||||
| {
|
||||
type: 'method:end'
|
||||
method:
|
||||
| 'createAccount'
|
||||
| 'login'
|
||||
| 'logout'
|
||||
| 'resumeSession'
|
||||
| 'removeAccount'
|
||||
'createAccount' | 'login' | 'logout' | 'resumeSession' | 'removeAccount'
|
||||
account?: RedactedAccount
|
||||
}
|
||||
| {
|
||||
|
||||
@@ -33,12 +33,7 @@ export type OnPostSuccessData =
|
||||
| undefined
|
||||
|
||||
export type ComposerLogContext =
|
||||
| 'Fab'
|
||||
| 'PostReply'
|
||||
| 'QuotePost'
|
||||
| 'ProfileFeed'
|
||||
| 'Deeplink'
|
||||
| 'Other'
|
||||
'Fab' | 'PostReply' | 'QuotePost' | 'ProfileFeed' | 'Deeplink' | 'Other'
|
||||
|
||||
export interface ComposerOpts {
|
||||
replyTo?: ComposerOptsPostRef
|
||||
|
||||
@@ -27,11 +27,7 @@ type Controls = {
|
||||
* The did of the account to populate the login form with.
|
||||
*/
|
||||
requestedAccount?:
|
||||
| (string & {})
|
||||
| 'none'
|
||||
| 'new'
|
||||
| 'starterpack'
|
||||
| 'groupchat'
|
||||
(string & {}) | 'none' | 'new' | 'starterpack' | 'groupchat'
|
||||
}) => void
|
||||
/**
|
||||
* Clears the requested account so that next time the logged out view is
|
||||
|
||||
@@ -40,9 +40,7 @@ export interface Follow10ProgressGuide extends BaseProgressGuide {
|
||||
}
|
||||
|
||||
export type ProgressGuide =
|
||||
| Like10AndFollow7ProgressGuide
|
||||
| Follow10ProgressGuide
|
||||
| undefined
|
||||
Like10AndFollow7ProgressGuide | Follow10ProgressGuide | undefined
|
||||
|
||||
const ProgressGuideContext = createContext<ProgressGuide>(undefined)
|
||||
ProgressGuideContext.displayName = 'ProgressGuideContext'
|
||||
|
||||
Reference in New Issue
Block a user