diff --git a/src/screens/Onboarding/util.ts b/src/screens/Onboarding/util.ts index 14750f34c7..143671cb34 100644 --- a/src/screens/Onboarding/util.ts +++ b/src/screens/Onboarding/util.ts @@ -2,7 +2,9 @@ import { AppBskyGraphFollow, AppBskyGraphGetFollows, BskyAgent, + ComAtprotoRepoApplyWrites, } from '@atproto/api' +import {$Typed} from '@atproto/api/dist/client/util' import {TID} from '@atproto/common-web' import chunk from 'lodash.chunk' @@ -15,7 +17,7 @@ export async function bulkWriteFollows(agent: BskyAgent, dids: string[]) { throw new Error(`bulkWriteFollows failed: no session`) } - const followRecords: AppBskyGraphFollow.Record[] = dids.map(did => { + const followRecords: $Typed[] = dids.map(did => { return { $type: 'app.bsky.graph.follow', subject: did, @@ -23,12 +25,13 @@ export async function bulkWriteFollows(agent: BskyAgent, dids: string[]) { } }) - const followWrites = followRecords.map(r => ({ - $type: 'com.atproto.repo.applyWrites#create', - collection: 'app.bsky.graph.follow', - rkey: TID.nextStr(), - value: r, - })) + const followWrites: $Typed[] = + followRecords.map(r => ({ + $type: 'com.atproto.repo.applyWrites#create', + collection: 'app.bsky.graph.follow', + rkey: TID.nextStr(), + value: r, + })) const chunks = chunk(followWrites, 50) for (const chunk of chunks) {