File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,13 +28,10 @@ expectAssignable<Effect>({ serialize: {} })
2828
2929switchStatement . default ( BaseError )
3030switchStatement . default ( BaseError . subclass ( 'BaseError' ) )
31- expectError ( switchStatement . default ( Error ) )
3231switchStatement . case ( 'Error' , BaseError )
3332switchStatement . case ( 'Error' , BaseError . subclass ( 'BaseError' ) )
34- expectError ( switchStatement . case ( 'Error' , Error ) )
3533expectAssignable < Effect > ( BaseError )
3634expectAssignable < Effect > ( BaseError . subclass ( 'BaseError' ) )
37- expectNotAssignable < Effect > ( Error )
3835
3936switchStatement . default ( ( ) => true )
4037switchStatement . default ( ( error : unknown ) => true )
Original file line number Diff line number Diff line change 1- import type { Info , ErrorInstance , ErrorClass } from 'modern-errors'
1+ import type { Info , ErrorInstance } from 'modern-errors'
22
33/**
44 * The `condition` can be:
@@ -34,7 +34,7 @@ export type Condition =
3434export type Effect =
3535 | string
3636 | { [ _ : string ] : unknown }
37- | ErrorClass
37+ | ( new ( ... args : any [ ] ) => Error )
3838 | ( ( error : unknown ) => unknown )
3939
4040/**
You can’t perform that action at this time.
0 commit comments