Skip to content

Commit

Permalink
Callback type: Make value optional, make error nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
thomastoye committed Apr 14, 2021
1 parent ac8d040 commit 6c08569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/index.d.ts
Expand Up @@ -71,7 +71,7 @@ declare namespace schema {

type Schema = Type | schema.AvroSchema;

type Callback<V, Err = any> = (err: Err, value: V) => void;
type Callback<V, Err = any> = (err: Err | null, value?: V) => void;


type Codec = (buffer: Buffer, callback: Callback<Buffer>) => void;
Expand Down

0 comments on commit 6c08569

Please sign in to comment.