-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import { Context, type Effect } from 'effect' | ||
import { Context, Data, type Effect } from 'effect' | ||
import type { Html } from './html.js' | ||
|
||
export class PageIsNotFound extends Data.TaggedError('PageIsNotFound') {} | ||
|
||
export class PageIsUnavailable extends Data.TaggedError('PageIsUnavailable') {} | ||
|
||
export class GetPageFromGhost extends Context.Tag('GetPageFromGhost')< | ||
GetPageFromGhost, | ||
(id: string) => Effect.Effect<Html, 'unavailable' | 'not-found'> | ||
(id: string) => Effect.Effect<Html, PageIsUnavailable | PageIsNotFound> | ||
>() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters