Open ulf1 opened 1 year ago
https://github.com/ionic-team/tutorial-photo-gallery-vue/blob/d7e0f0bdb3f4326f3cb0a2f4d6b374dfe9c682d1/src/composables/usePhotoGallery.ts#L64
Line 64 causes TS errors TS2352: Conversion of type 'void' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
TS2352: Conversion of type 'void' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Cause: convertBlobToBase64 (https://github.com/ionic-team/tutorial-photo-gallery-vue/blob/main/src/composables/usePhotoGallery.ts#L37) doesn't specify string as promise output type
convertBlobToBase64
string
Fix:
base64FromPath
base64Data = await base64FromPath(photo.webPath!);
https://github.com/ionic-team/tutorial-photo-gallery-vue/blob/d7e0f0bdb3f4326f3cb0a2f4d6b374dfe9c682d1/src/composables/usePhotoGallery.ts#L64
Line 64 causes TS errors
TS2352: Conversion of type 'void' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Cause:
convertBlobToBase64
(https://github.com/ionic-team/tutorial-photo-gallery-vue/blob/main/src/composables/usePhotoGallery.ts#L37) doesn't specifystring
as promise output typeFix:
base64FromPath
from line 112 https://github.com/ionic-team/tutorial-photo-gallery-react/blob/009dceb500144d20bc4a2c45e3a95c256eacec93/src/hooks/usePhotoGallery.ts#L112base64Data = await base64FromPath(photo.webPath!);
from 58 https://github.com/ionic-team/tutorial-photo-gallery-react/blob/009dceb500144d20bc4a2c45e3a95c256eacec93/src/hooks/usePhotoGallery.ts#L58