nativescript-community / ui-image

Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.
Apache License 2.0
36 stars 9 forks source link

ui-zoomimage - initialize property does not exist #59

Closed rdlauer closed 3 months ago

rdlauer commented 3 months ago

in app.ts:

import * as imageModule from "@nativescript-community/ui-zoomimage";
imageModule.initialize({ isDownsampleEnabled: true });

When building:

Property 'initialize' does not exist on type 'typeof import("/apps/myapp/node_modules/@nativescript-community/ui-zoomimage/index")'.

This is on iOS after ns clean.

ui-image works just fine so this is an odd one!

farfromrefug commented 3 months ago

@rdlauer thanks for the report. It is a typings issue, the export actually exists just not exported in the typings. will fix it

farfromrefug commented 3 months ago

@rdlauer should be released

rdlauer commented 3 months ago

Thanks! I wonder if something else is missing though (this is for a core app). Hitting this runtime error:

  Uncaught Error: Building UI from XML. @tour/tour-page.xml:13:3
   > Module '@nativescript-community/ui-zoomimage' not found for element '@nativescript-community/ui-zoomimage:Img'.
     > instanceType is not a constructor
farfromrefug commented 3 months ago

@rdlauer never saw that error. Can't really tell like that

rdlauer commented 3 months ago

Hmmm strange. I assume I'm doing this right w/ this in the page tag?

xmlns:img="@nativescript-community/ui-zoomimage"

and here is an image example:

<img:Img src="{{ user_image }}" class="image-profile-small" />
farfromrefug commented 3 months ago

@rdlauer it is ZoomImg and not Img. see here

rdlauer commented 3 months ago

omg, how did i miss that? thank you!