Skip to content

Commit ef81e41

Browse files
committedSep 27, 2020
Fix TypeScript types
Fixes #33
1 parent 20e5dd3 commit ef81e41

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎index.d.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ declare const hasha: {
109109
@param stream - A stream you want to hash.
110110
@returns The calculated hash.
111111
*/
112-
fromStream(stream: NodeJS.ReadableStream): Promise<string | null>;
112+
fromStream(stream: NodeJS.ReadableStream): Promise<string>;
113113
fromStream(
114114
stream: NodeJS.ReadableStream,
115115
options?: hasha.Options<hasha.ToStringEncoding>
116-
): Promise<string | null>;
116+
): Promise<string>;
117117
fromStream(
118118
stream: NodeJS.ReadableStream,
119119
options?: hasha.Options<'buffer'>
120-
): Promise<Buffer | null>;
120+
): Promise<Buffer>;
121121

122122
/**
123123
Calculate the hash for a file.
@@ -140,15 +140,15 @@ declare const hasha: {
140140
})();
141141
```
142142
*/
143-
fromFile(filePath: string): Promise<string | null>;
143+
fromFile(filePath: string): Promise<string>;
144144
fromFile(
145145
filePath: string,
146146
options: hasha.Options<hasha.ToStringEncoding>
147-
): Promise<string | null>;
147+
): Promise<string>;
148148
fromFile(
149149
filePath: string,
150150
options: hasha.Options<'buffer'>
151-
): Promise<Buffer | null>;
151+
): Promise<Buffer>;
152152

153153
/**
154154
Synchronously calculate the hash for a file.

0 commit comments

Comments
 (0)
Please sign in to comment.