Skip to content

Commit 5bfece2

Browse files
committed
chore(types): remove outdated neverthrow integration example from ThatError type documentation
1 parent 429118e commit 5bfece2

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

packages/core/src/types.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -187,20 +187,6 @@ export type ErrorUnionOf<F> =
187187
* ```ts
188188
* type ErrType = ThatError<typeof AppError>;
189189
* ```
190-
*
191-
* @example
192-
* ### USE CASE: Integration with neverthrow
193-
* ```ts
194-
* function fetchData(): ResultAsync<string, ThatError<typeof AppError, 'Timeout' | 'Network'>> {
195-
* return fromPromise(
196-
* api.get('/data'),
197-
* (e: unknown) => AppError.bridge(e as Error, (err, cases) => {
198-
* if (err.message.includes('timeout')) return cases.Timeout();
199-
* return cases.Network();
200-
* }) as ThatError<typeof AppError, 'Timeout' | 'Network'>
201-
* );
202-
* }
203-
* ```
204190
*/
205191
export type ThatError<
206192
F,

0 commit comments

Comments
 (0)