Skip to content

Commit e3469e9

Browse files
committed
Fix types
1 parent 74fcb3e commit e3469e9

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

types/effect.test-d.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,10 @@ expectAssignable<Effect>({ serialize: {} })
2828

2929
switchStatement.default(BaseError)
3030
switchStatement.default(BaseError.subclass('BaseError'))
31-
expectError(switchStatement.default(Error))
3231
switchStatement.case('Error', BaseError)
3332
switchStatement.case('Error', BaseError.subclass('BaseError'))
34-
expectError(switchStatement.case('Error', Error))
3533
expectAssignable<Effect>(BaseError)
3634
expectAssignable<Effect>(BaseError.subclass('BaseError'))
37-
expectNotAssignable<Effect>(Error)
3835

3936
switchStatement.default(() => true)
4037
switchStatement.default((error: unknown) => true)

types/main.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 =
3434
export type Effect =
3535
| string
3636
| { [_: string]: unknown }
37-
| ErrorClass
37+
| (new (...args: any[]) => Error)
3838
| ((error: unknown) => unknown)
3939

4040
/**

0 commit comments

Comments
 (0)