about summary refs log tree commit diff
path: root/src/state/models/discovery/foafs.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-06-02 15:01:04 -0500
committerGitHub <noreply@github.com>2023-06-02 15:01:04 -0500
commite8843ded5bf1f3d97b735ffe8f8553de46f9b18b (patch)
tree9c94613890fdc5428875dede148a5dd48e1c21a3 /src/state/models/discovery/foafs.ts
parent46c9de7c1865a57d2fef926db2d923a8687eca18 (diff)
downloadvoidsky-e8843ded5bf1f3d97b735ffe8f8553de46f9b18b.tar.zst
Fix a bunch of type errors and add a type-check to the github workflows (#837)
* Add yarn type-check

* Rename to yarn typecheck

* Fix a collection of type errors

* Add typecheck to automated tests

* add `dist` to exluded folders tsconfig

---------

Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
Diffstat (limited to 'src/state/models/discovery/foafs.ts')
-rw-r--r--src/state/models/discovery/foafs.ts16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/state/models/discovery/foafs.ts b/src/state/models/discovery/foafs.ts
index f6e3157b7..4bbd32807 100644
--- a/src/state/models/discovery/foafs.ts
+++ b/src/state/models/discovery/foafs.ts
@@ -1,4 +1,7 @@
-import {AppBskyActorDefs} from '@atproto/api'
+import {
+  AppBskyActorDefs,
+  AppBskyGraphGetFollows as GetFollows,
+} from '@atproto/api'
 import {makeAutoObservable, runInAction} from 'mobx'
 import sampleSize from 'lodash.samplesize'
 import {bundleAsync} from 'lib/async/bundle'
@@ -43,11 +46,12 @@ export class FoafsModel {
       {
         let cursor
         for (let i = 0; i < 10; i++) {
-          const res = await this.rootStore.agent.getFollows({
-            actor: this.rootStore.me.did,
-            cursor,
-            limit: 100,
-          })
+          const res: GetFollows.Response =
+            await this.rootStore.agent.getFollows({
+              actor: this.rootStore.me.did,
+              cursor,
+              limit: 100,
+            })
           this.rootStore.me.follows.hydrateProfiles(res.data.follows)
           if (!res.data.cursor) {
             break