We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 388f809 + 1991595 commit 30bb8dbCopy full SHA for 30bb8db
src/index.ts
@@ -20,7 +20,7 @@ export class Failure<E> {
20
21
constructor(public error: E) {
22
if (error === null || error === undefined) {
23
- throw new Error('Parameter "error" is required');
+ throw new TypeError('Parameter "error" is required');
24
}
25
26
@@ -30,7 +30,7 @@ export class Success<D> {
30
31
constructor(public data: D) {
32
if (data === null || data === undefined) {
33
- throw new Error('Parameter "data" is required');
+ throw new TypeError('Parameter "data" is required');
34
35
36
0 commit comments