From 5abc6cf75bff9adc532ad73b8f2341e1861fe57e Mon Sep 17 00:00:00 2001 From: Jurriaan Barkey Wolf Date: Sat, 25 Apr 2020 09:39:57 +0200 Subject: [PATCH] Added null to return types of functions that may return null --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 0c4073fc..18c0743b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -154,7 +154,7 @@ interface JSZip { * @param Path relative path to file * @return File matching path, null if no file found */ - file(path: string): JSZip.JSZipObject; + file(path: string): JSZip.JSZipObject | null; /** * Get files matching a RegExp from archive @@ -181,7 +181,7 @@ interface JSZip { * @param name Name of the folder * @return New JSZip object with the given folder as root or null */ - folder(name: string): JSZip; + folder(name: string): JSZip | null; /** * Returns new JSZip instances with the matching folders as root