Skip to content

Commit 2aad916

Browse files
authored
Merge pull request #669 from jjhbw/master
Typescript definitions: added null to return types of functions that may return null
2 parents 9d56abc + 5abc6cf commit 2aad916

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ interface JSZip {
154154
* @param Path relative path to file
155155
* @return File matching path, null if no file found
156156
*/
157-
file(path: string): JSZip.JSZipObject;
157+
file(path: string): JSZip.JSZipObject | null;
158158

159159
/**
160160
* Get files matching a RegExp from archive
@@ -181,7 +181,7 @@ interface JSZip {
181181
* @param name Name of the folder
182182
* @return New JSZip object with the given folder as root or null
183183
*/
184-
folder(name: string): JSZip;
184+
folder(name: string): JSZip | null;
185185

186186
/**
187187
* Returns new JSZip instances with the matching folders as root

0 commit comments

Comments
 (0)