Skip to content

Commit

Permalink
typedef voor kanalen
Browse files Browse the repository at this point in the history
  • Loading branch information
felixcicatt committed Apr 8, 2024
1 parent b03df88 commit 7c63d0d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 28 deletions.
54 changes: 27 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/features/Kanalen/service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { fetchLoggedIn, ServiceResult, throwIfNotOk } from "@/services";

async function fetchAll(url: string) {
type Kanaal = {
id: number,
naam: string
}

async function fetchAll(url: string): Promise<Kanaal[]> {
return await fetchLoggedIn(url)
.then(throwIfNotOk)
.then((r) => r.json());
Expand Down

0 comments on commit 7c63d0d

Please sign in to comment.