Fix
Lint / lint (push) Successful in 38s

This commit is contained in:
Julien Valverdé
2026-07-19 04:00:46 +02:00
parent 885cff74b3
commit 31d87ffcab
24 changed files with 219 additions and 907 deletions
+15
View File
@@ -0,0 +1,15 @@
import { Effect } from "effect"
export interface Post {
readonly title: string
readonly body: string
}
export const fetchPost = (id: number) => Effect.tryPromise({
try: () =>
fetch(`https://jsonplaceholder.typicode.com/posts/${id}`)
.then(response => response.json() as Promise<Post>),
catch: () => new Error("Unable to fetch post"),
})