natysoz / expo-images-picker

Multiple Asset Photos Videos selecting package for Expo SDK
MIT License
95 stars 35 forks source link

Return always a value in function to satisfy 'noImplicitReturns' rule #42

Closed oliverwelter closed 2 years ago

oliverwelter commented 2 years ago

In case of an error the catch block will be executed but doesn't return any value. Using a fall through return at the end of the function satisfies the rule of 'noImplicitReturns'.

natysoz commented 2 years ago

can u bump the version on README ? and ill merge , i think the issue with compiler for some people can be fixed if they just add exclude to their tsconfig and exclude node module i guess... :S

do u actually get an error when building ?

oliverwelter commented 2 years ago

Yes, the compile issue occurs even if node_modules is listed in excludes and using the skipLibCheck option. I came to the conclusion that the behavior of these parameters for the typescript compiler differ depending on the library artifact. In case the library consists of javascript plus additional type information in d.ts files these parameters might disable the checks but if the library itself provides typescript code the typescript compiler analysis the files accessed via imports and applies the same rules as for the actual project. I'm not sure if this is meant to be like that or an unresolved issue. The documentation isn't clear about it and can be, mildly said, called ambiguous about it.

I'm more than happy to bump the version but I'm note entirely sure if understand correctly what to do because I didn't find any version number to bump in the README.md. Do you mean the package.json and CHANGELOG.md file instead?

natysoz commented 2 years ago

yes sorry , i mean package json

oliverwelter commented 2 years ago

package.json pointed to version 2.2.1 but CHANGELOG.md already included 2.2.2 therefor I bumped to version 2.2.3 in both files.