sindresorhus/screenfull

readonly isEnabled typed as true rather than boolean

Samuel-Therrien-Beslogic opened this issue ยท 0 comments

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch screenfull@5.2.0 for the project I'm working on.

Unless I'm missing something, it feels like readonly isEnabled should be typed as boolean. Otherwise, there's no point to an always true conditional.

Here is the diff that solved my problem:

diff --git a/node_modules/screenfull/dist/screenfull.d.ts b/node_modules/screenfull/dist/screenfull.d.ts
index da3b469..9a7f7b0 100644
--- a/node_modules/screenfull/dist/screenfull.d.ts
+++ b/node_modules/screenfull/dist/screenfull.d.ts
@@ -33,7 +33,7 @@ declare namespace screenfull {
 		}
 		```
 		*/
-		readonly isEnabled: true;
+		readonly isEnabled: boolean;
 
 		/**
 		Exposes the raw properties (prefixed if needed) used internally.

This issue body was partially generated by patch-package.